Skip to content
  • 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_inf...
    d13cb974