[PATCH xserver] os: don't re-remove an already removed fd

Keith Packard keithp at keithp.com
Thu Aug 11 19:39:46 UTC 2016

Peter Hutterer <peter.hutterer at who-t.net> writes:

> that's the plan for the driver, but for now the current behaviour is a
> change to what used to work. And it's a bit confusing too -
> xf86AddEnabledDevice() takes a pInfo, not just an fd. So it looks like it
> works on a per-device level and we should emulate that behaviour as best as
> we can. Right now you can pass two different pInfos in and then you get to
> bet whether you remove the same device twice or not.

I went and looked at the previous version of xf86AddEnabledDevice, and
it supports multiple calls with the same fd by replacing the callback
and args. We can do the same thing with InputThreadRegisterDev and make
it actually compatible with the old API. Seems like a more sane plan
than having duplicate fds in the input device list, only one of which
actually gets used.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-os-Allow-re-registering-fd-with-InputThreadRegisterD.patch
Type: text/x-diff
Size: 2182 bytes
Desc: not available
URL: <https://lists.x.org/archives/xorg-devel/attachments/20160811/b7e5bb52/attachment.patch>
-------------- next part --------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 810 bytes
Desc: not available
URL: <https://lists.x.org/archives/xorg-devel/attachments/20160811/b7e5bb52/attachment.sig>

More information about the xorg-devel mailing list