summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2016-08-17 11:32:12 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2016-08-17 20:00:31 +1000
commit486322116d70365c2e2a1d9f45830057fa03153e (patch)
tree1921c05dfe2264492d9a15412c1d586b9b2ba3cf
parentcd9f9799235aefff1ec1a0af9ec6b45969119659 (diff)
eventcomm: don't ever probe if a device is set
If opening the fd fails we still need to fail the device. This is particularly the case when a device disappears before we can open it - the current code wouldn't exit but instead switch to auto-probe touchpad devices on the system. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
-rw-r--r--src/eventcomm.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/eventcomm.c b/src/eventcomm.c
index 9c9a036..f65d532 100644
--- a/src/eventcomm.c
+++ b/src/eventcomm.c
@@ -1009,13 +1009,13 @@ EventAutoDevProbe(InputInfoPtr pInfo, const char *device)
if (!(pInfo->flags & XI86_SERVER_FD))
SYSCALL(close(fd));
-
- /* if a device is set and not a touchpad (or already grabbed),
- * we must return FALSE. Otherwise, we'll add a device that
- * wasn't requested for and repeat
- * f5687a6741a19ef3081e7fd83ac55f6df8bcd5c2. */
- return touchpad_found;
}
+
+ /* if a device is set and not a touchpad (or already grabbed),
+ * we must return FALSE. Otherwise, we'll add a device that
+ * wasn't requested for and repeat
+ * f5687a6741a19ef3081e7fd83ac55f6df8bcd5c2. */
+ return touchpad_found;
}
i = scandir(DEV_INPUT_EVENT, &namelist, EventDevOnly, alphasort);