xserver-multidpi/config
Peter Hutterer d13cb97442 ddx: add new call to purge input devices that weren't added
Special case for the systemd-logind case in xfree86: when we're vt-switched
away and a device is plugged in, we get a paused fd from logind. Since we
can't probe the device or do anything with it, we store that device in the
xfree86 and handle it later when we vt-switch back. The device is not added to
inputInfo.devices until that time.

When the device is removed while still vt-switched away, the the config system
never notifies the DDX. It only runs through inputInfo.devices and our device
was never added to that.

When a device is plugged in, removed, and plugged in again while vt-switched
away, we have two entries in the xfree86-specific list that refer to the same
device node, both pending for addition later. On VT switch back, the first one
(the already removed one) will be added successfully, the second one (the
still plugged-in one) fails. Since the fd is correct, the device works until
it is removed again. The removed devices' config_info (i.e. the syspath)
doesn't match the actual device we addded tough (the input number increases
with each plug), it doesn't get removed, the fd remains open and we lose track
of the fd count. Plugging the device in again leads to a dead device.

Fix this by adding a call to notify the DDX to purge any remainders of devices
with the given config_info, that's the only identifiable bit we have at this
point.

https://bugs.freedesktop.org/show_bug.cgi?id=97928

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-10-26 15:35:07 +10:00
..
10-quirks.conf config: revert quirk for the Evoluent Vertical Mouse 2014-05-15 12:56:54 +10:00
config-backends.h dbus-core: Make dbus-core no longer mutually exclusive with udev 2014-01-29 15:28:58 -08:00
config.c ddx: add new call to purge input devices that weren't added 2016-10-26 15:35:07 +10:00
dbus-api Hotplug: D-Bus: API version 2 2007-08-01 01:53:31 +03:00
dbus-core.c config/dbus: Initialize dbus fd to -1 so teardown doesn't use fd 0 2016-09-15 21:30:38 -07:00
fdi2iclass.py config: Script to convert HAL fdi settings to InputClass sections 2010-06-11 09:31:38 +10:00
hal.c xfree86: add support for MatchIsTabletPad 2016-05-03 16:15:51 +10:00
Makefile.am config: remove 10-evdev.conf, let the evdev driver install that file 2015-05-18 13:41:09 +10:00
udev.c config: Hold input lock across udev socket handling 2016-08-16 17:33:59 +10:00
wscons.c config/udev: distinguish between real keyboards and other key devices 2016-03-01 10:46:48 -05:00
x11-input.fdi config: remove mention of AllowEmptyInput 2010-11-11 10:26:44 +10:00