xserver-multidpi/hw/xquartz
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
..
bundle XQuartz: Update copyright years 2016-05-04 00:08:34 -07:00
GL glx: Fix computation of GLX_X_RENDERABLE fbconfig attribute 2016-09-06 10:29:14 -04:00
mach-startup XQuartz: Silence a clang static analysis warning about a possible memory leak on exit 2014-01-12 23:12:48 -08:00
man XQuartz: Add a scroll_in_device_direction preference 2011-07-19 20:00:27 -07:00
pbproxy XQuartz: pbproxy shouldn't need to wait for server initialization. 2016-09-22 14:55:02 -07:00
xpr cursor: drop ARGB_CURSOR 2015-06-30 12:17:51 +10:00
applewm.c XQuartz: Avoid passing uninitialized pointers to X11ApplicationSetWindowMenu in AppleWMSetWindowMenu 2014-01-12 23:12:49 -08:00
applewmExt.h XQuartz: Source formatting cleanup 2012-03-24 01:07:06 -07:00
console_redirect.c XQuartz: console_redirect: Properly zero-out the tail of the array on realloc() 2012-08-16 19:44:00 -07:00
console_redirect.h XQuartz: Source formatting cleanup 2012-03-24 01:07:06 -07:00
darwin.c XQuartz: Remove X11ApplicationFatalError 2016-09-22 14:55:02 -07:00
darwin.h XQuartz: Source formatting cleanup 2012-03-24 01:07:06 -07:00
darwinEvents.c XQuartz: Silence an expected TSan warning 2016-09-22 14:55:03 -07:00
darwinEvents.h XQuartz: darwinPointer now sends both absolute and relative motion 2012-04-23 20:20:42 -07:00
darwinfb.h XQuartz: Fix darwinfb.h header guard 2014-01-12 23:12:48 -08:00
darwinXinput.c ddx: add new call to purge input devices that weren't added 2016-10-26 15:35:07 +10:00
keysym2ucs.c XQuartz: Source formatting cleanup 2012-03-24 01:07:06 -07:00
keysym2ucs.h XQuartz: Source formatting cleanup 2012-03-24 01:07:06 -07:00
Makefile.am Build fbcmap_mi.c once, rather than once for each DDX 2014-03-27 14:34:06 +00:00
quartz.c dix: Add hybrid full-size/empty-clip mode to SetRootClip 2016-02-22 13:26:31 -05:00
quartz.h dix: Add hybrid full-size/empty-clip mode to SetRootClip 2016-02-22 13:26:31 -05:00
quartzCocoa.m Remove readmask from screen block/wakeup handler 2016-07-18 15:27:51 -04:00
quartzCommon.h Remove readmask from screen block/wakeup handler 2016-07-18 15:27:51 -04:00
quartzKeyboard.c XQuartz: Silence -Wunused-function 2015-06-09 23:42:03 -07:00
quartzKeyboard.h XQuartz: Source formatting cleanup 2012-03-24 01:07:06 -07:00
quartzRandR.c XQuartz: Source formatting cleanup 2012-03-24 01:07:06 -07:00
quartzRandR.h XQuartz: Source formatting cleanup 2012-03-24 01:07:06 -07:00
quartzStartup.c XQuartz: Don't respond to SIGALRM on the AppKit thread 2016-09-22 14:55:01 -07:00
sanitizedCarbon.h XQuartz: Source formatting cleanup 2012-03-24 01:07:06 -07:00
sanitizedCocoa.h XQuartz: Source formatting cleanup 2012-03-24 01:07:06 -07:00
X11Application.h XQuartz: Remove X11ApplicationFatalError 2016-09-22 14:55:02 -07:00
X11Application.m XQuartz: Adopt input_lock() and input_unlock() 2016-09-22 14:55:02 -07:00
X11Controller.h XQuartz: Source formatting cleanup 2012-03-24 01:07:06 -07:00
X11Controller.m XQuartz: Silence -Wformat-security for NSRunAlertPanel 2015-06-09 23:42:03 -07:00