[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: xorg-server/*bsd: moving from hal support to devd support?



On Sun, Feb 13, 2011 at 4:40 AM, Cyril Brulebois <kibi@debian.org> wrote:
> Hi FreeBSD/X11 folks,
>
> as an occasional GNU/kFreeBSD porter, I've been wondering what's going
> to happen with hal going away/being unmaintained. I've been pointed to
> a blog post about Xfce on *BSD [1], where it is mentioned that devd
> might be used as a udev equivalent.
>
>  1. http://gezeiten.org/post/2011/01/Xfce-4.8-on-BSD-flavors
>
> Are there any plans to add devd support to xorg on your side? I'm
> putting the Debian GNU/kFreeBSD users/porters list and the Xorg devel
> list in Cc.

As someone who's worked on the udev backend for input devices, what
needs to be provided is pretty simple.

1. X needs to know about devices that are already plugged in when the
server starts

2. X needs to get events for devices when they are inserted or removed

3. X needs a basic level of metadata about the device to allow the
user to match to the device. Basically, filling out the
InputAttributes struct (see include/input.h):

typedef struct _InputAttributes {
    char                *product;
    char                *vendor;
    char                *device;
    char                *pnp_id;
    char                *usb_id;
    char                **tags; /* null-terminated */
    uint32_t            flags;
} InputAttributes;

#define ATTR_KEYBOARD (1<<0)
#define ATTR_POINTER (1<<1)
#define ATTR_JOYSTICK (1<<2)
#define ATTR_TABLET (1<<3)
#define ATTR_TOUCHPAD (1<<4)
#define ATTR_TOUCHSCREEN (1<<5)

Where flags is currently just a bitfield for the ATTR_* macros and
tags are freeform labels coming from the backend (optional). After
that it gets handed off to the DDX.

--
Dan


Reply to: