RFC: Listening for devices being added - udev vs. X11
Martin Kelly
martin at martingkelly.com
Mon Apr 21 15:40:36 CEST 2014
Nick Schermer wrote:
> Thunar is different in is aspect since it is required to watch for
> block/usb events, which is not possible through X, so there gudev
> became optional.
>
> Keyboards are a different issue, it is easy to watch those with X and
> should therefore be the preferred option. Look at the pointers code
> (instead of IsXExtensionPointer use IsXExtensionKeyboard).
> Advantage is you have the correct device too, which is probably needed
> to set some of the properties as well.
>
> Nick
>
X is more optimal in supporting all platforms and not adding more
dependencies. However, it's less feature-proof as any X-dependent code
is eventually throwaway code. I have the gudev part of this working now.
It sounds like the optimal solution here to balance this needs is to
#ifdef the code to use gudev if it's present and fall back to X if not.
My current code already has the #ifdef for gudev, so I just need to add
an X case.
More information about the Xfce4-dev
mailing list