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

Carlos Silva r3pek at r3pek.org
Mon Apr 21 22:55:50 CEST 2014


I really don't know, but, isn't libinput and option on Linux?


On Mon, Apr 21, 2014 at 7:53 PM, Nick Schermer <nick at xfce.org> wrote:

> On Mon, Apr 21, 2014 at 3:40 PM, Martin Kelly <martin at martingkelly.com>
> 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.
>
> Udev == systemd, so for feature-proof I put my chips on X11 ;-). We
> are talking about what, maybe 20 lines of code? I doubt it will be
> much smaller in gudev, which is a new dependency for xfce4-settings.
>
> That said, 2 paths (monitoring) leading to the same end result is a no
> go, it will only lead to confusing bug reports.
>
> So X11 is the only good option, unless it is impossible and gudev is
> required.
>
> Nick
> _______________________________________________
> Xfce4-dev mailing list
> Xfce4-dev at xfce.org
> https://mail.xfce.org/mailman/listinfo/xfce4-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.xfce.org/pipermail/xfce4-dev/attachments/20140421/d686de80/attachment.html>


More information about the Xfce4-dev mailing list