RFC: Listening for devices being added - udev vs. X11

Alistair Buxton a.j.buxton at gmail.com
Wed Apr 23 01:49:09 CEST 2014


On 22 April 2014 20:33, Matthew Brush <mbrush at codebrainz.ca> wrote:
> On 14-04-21 06:40 AM, Martin Kelly wrote:
>>
>> 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.
>>
>
> Technically all code is throw-away code from that perspective (except maybe
> win32 API code), even as an example with GTK4 planned, writing GTK3 code is
> already not future-proof as it will be deprecated closer to GTK4 (much of it
> already is). That being said, I'd wager X(lib) will still be available in
> one form or another for far longer than GTK3, GTK4 and Udev combined :)
>

It seems like Wayland is the elephant in the room here.

I've done some research on this and basically Xfwm, Xfce panel,
Xfdesktop, and many of the configuration panels will require a full
rewrite to make them native Wayland. There's almost no possibility to
simply remove X11 dependencies and refactor. It really would be easier
to do a 100% from-scratch rewrite.

As such, I wouldn't worry too much about adding more X11 dependencies
unless you're planning on starting Xfce5. :)


-- 
Alistair Buxton
a.j.buxton at gmail.com


More information about the Xfce4-dev mailing list