[PATCH] inputthread: Fix inputthread not listening if a fd gets re-added immediately after removal

Keith Packard keithp at keithp.com
Wed Oct 5 16:23:23 UTC 2016


Hans de Goede <hdegoede at redhat.com> writes:

> When a fd is removed dev->state gets set to device_state_removed,
> if the fd then gets re-added before InputThreadDoWork() deals with
> the removal, the InputThreadDevice struct gets reused, but its
> state would stay device_state_removed, so it would still get removed
> on the first InputThreadDoWork() run, resulting in a non functioning
> input device.
>
> This commit fixes this by (re-)setting dev->state to device_state_running
> when a InputThreadDevice struct gets reused.
>
> This fixes input devices sometimes no longer working after a vt-switch.
>
> Signed-off-by: Hans de Goede <hdegoede at redhat.com>

Reviewed-by: Keith Packard <keithp at keithp.com>

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


More information about the xorg-devel mailing list