diff options
author | marha <marha@users.sourceforge.net> | 2011-08-01 09:13:47 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-08-01 09:13:47 +0200 |
commit | 6730a76afc49a80573b2e582085086c2956fe96d (patch) | |
tree | 1478eb4f497670caeb2af983eadc4aee20f48b68 /xorg-server/config | |
parent | a69cff9373daf6b7afc97fb975ceb4fc0d6864f7 (diff) | |
parent | f87ad0cdc41af88f134475ab50b0d604004d9cdc (diff) | |
download | vcxsrv-6730a76afc49a80573b2e582085086c2956fe96d.tar.gz vcxsrv-6730a76afc49a80573b2e582085086c2956fe96d.tar.bz2 vcxsrv-6730a76afc49a80573b2e582085086c2956fe96d.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
mesalib/src/glsl/ast_function.cpp
mesalib/src/glsl/glsl_types.cpp
mesalib/src/mesa/main/teximage.c
mesalib/src/mesa/main/texparam.c
xorg-server/config/udev.c
xorg-server/configure.ac
xorg-server/dix/main.c
xorg-server/hw/dmx/dmxinit.c
xorg-server/hw/kdrive/src/kdrive.c
xorg-server/hw/xfree86/common/xf86Config.c
xorg-server/hw/xfree86/common/xf86Configure.c
xorg-server/hw/xfree86/common/xf86Helper.c
xorg-server/hw/xfree86/common/xf86Init.c
xorg-server/hw/xfree86/common/xf86Option.c
xorg-server/hw/xfree86/common/xf86Priv.h
xorg-server/hw/xfree86/common/xf86Xinput.c
xorg-server/hw/xnest/Init.c
xorg-server/hw/xquartz/darwin.c
xorg-server/hw/xwin/InitOutput.c
xorg-server/hw/xwin/winerror.c
xorg-server/hw/xwin/xlaunch/config.cc
xorg-server/hw/xwin/xlaunch/config.h
xorg-server/hw/xwin/xlaunch/main.cc
xorg-server/hw/xwin/xlaunch/resources/dialog.rc
xorg-server/hw/xwin/xlaunch/resources/resources.h
xorg-server/hw/xwin/xlaunch/resources/resources.rc
xorg-server/hw/xwin/xlaunch/resources/strings.rc
xorg-server/hw/xwin/xlaunch/window/util.cc
xorg-server/hw/xwin/xlaunch/window/util.h
xorg-server/hw/xwin/xlaunch/window/wizard.h
xorg-server/include/os.h
xorg-server/os/log.c
xorg-server/xkeyboard-config/symbols/lv
Diffstat (limited to 'xorg-server/config')
-rw-r--r-- | xorg-server/config/udev.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/xorg-server/config/udev.c b/xorg-server/config/udev.c index c810b6b5e..63eb83605 100644 --- a/xorg-server/config/udev.c +++ b/xorg-server/config/udev.c @@ -251,14 +251,12 @@ wakeup_handler(pointer data, int err, pointer read_mask) return;
action = udev_device_get_action(udev_device);
if (action) {
- if (!strcmp(action, "add"))
- device_added(udev_device);
- else if (!strcmp(action, "remove"))
- device_removed(udev_device);
- else if (!strcmp(action, "change")) {
+ if (!strcmp(action, "add") || !strcmp(action, "change")) {
device_removed(udev_device);
device_added(udev_device);
}
+ else if (!strcmp(action, "remove"))
+ device_removed(udev_device);
}
udev_device_unref(udev_device);
}
@@ -283,6 +281,9 @@ config_udev_init(void) if (!udev_monitor)
return 0;
+ udev_monitor_filter_add_match_subsystem_devtype(udev_monitor, "input", NULL);
+ udev_monitor_filter_add_match_subsystem_devtype(udev_monitor, "tty", NULL); /* For Wacom serial devices */
+
if (udev_monitor_enable_receiving(udev_monitor)) {
ErrorF("config/udev: failed to bind the udev monitor\n");
return 0;
@@ -291,11 +292,20 @@ config_udev_init(void) enumerate = udev_enumerate_new(udev);
if (!enumerate)
return 0;
+
+ udev_enumerate_add_match_subsystem(enumerate, "input");
+ udev_enumerate_add_match_subsystem(enumerate, "tty");
+
udev_enumerate_scan_devices(enumerate);
devices = udev_enumerate_get_list_entry(enumerate);
udev_list_entry_foreach(device, devices) {
const char *syspath = udev_list_entry_get_name(device);
struct udev_device *udev_device = udev_device_new_from_syspath(udev, syspath);
+
+ /* Device might be gone by the time we try to open it */
+ if (!udev_device)
+ continue;
+
device_added(udev_device);
udev_device_unref(udev_device);
}
|