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.sepp...@vincit.fi>
Signed-off-by: Stefan Kost <stefan.k...@nokia.com>
---

Stefan, please ask a proper Reported-by tag for the bug from the
original reporter.

 config/udev.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/config/udev.c b/config/udev.c
index a2f5710..c120747 100644
--- a/config/udev.c
+++ b/config/udev.c
@@ -246,6 +246,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);
     }
-- 
1.7.0.4

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to