• Peter Hutterer's avatar
    ddx: add new call to purge input devices that weren't added · d13cb974
    Peter Hutterer authored
    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=97928Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
    d13cb974
Name
Last commit
Last update
Xext Loading commit data...
Xi Loading commit data...
composite Loading commit data...
config Loading commit data...
damageext Loading commit data...
dbe Loading commit data...
dix Loading commit data...
doc Loading commit data...
dri3 Loading commit data...
exa Loading commit data...
fb Loading commit data...
glamor Loading commit data...
glx Loading commit data...
hw Loading commit data...
include Loading commit data...
m4 Loading commit data...
man Loading commit data...
mi Loading commit data...
miext Loading commit data...
os Loading commit data...
present Loading commit data...
pseudoramiX Loading commit data...
randr Loading commit data...
record Loading commit data...
render Loading commit data...
test Loading commit data...
xfixes Loading commit data...
xkb Loading commit data...
.dir-locals.el Loading commit data...
.gitignore Loading commit data...
COPYING Loading commit data...
Makefile.am Loading commit data...
README Loading commit data...
autogen.sh Loading commit data...
configure.ac Loading commit data...
devbook.am Loading commit data...
docbook.am Loading commit data...
fix-miregion Loading commit data...
fix-miregion-private Loading commit data...
fix-patch-whitespace Loading commit data...
fix-region Loading commit data...
manpages.am Loading commit data...
xorg-server.m4 Loading commit data...
xorg-server.pc.in Loading commit data...
xserver.ent.in Loading commit data...