mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-08 05:38:03 +02:00
config: handle device change event properly
wakeup_handler in udev.c wasn't dealing with udev change events.
There are situations when a device can gain its input capabilities
after it has been added to the system and therefore the change events
must be handled as well.
The change is handled as a consecutive device removal and addition.
Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi>
Signed-off-by: Stefan Kost <Stefan.Kost@nokia.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 6243332782)
This commit is contained in:
parent
a07c07dc6c
commit
c5602d1639
1 changed files with 4 additions and 0 deletions
|
|
@ -255,6 +255,10 @@ wakeup_handler(pointer data, int err, pointer read_mask)
|
|||
device_added(udev_device);
|
||||
else if (!strcmp(action, "remove"))
|
||||
device_removed(udev_device);
|
||||
else if (!strcmp(action, "change")) {
|
||||
device_removed(udev_device);
|
||||
device_added(udev_device);
|
||||
}
|
||||
}
|
||||
udev_device_unref(udev_device);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue