summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2016-10-19 10:37:32 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2016-10-19 10:46:22 +1000
commit1dd61abf7e6af9cdd12d8f5a35fe90954aa03e64 (patch)
tree85b23c93b0ed028432d37abc36fd2a3b39322ecf
parentc80954386d536b83f2c9290e1a88515c04505818 (diff)
Wrap the input_lock calls into ifdefs
Missing from a790ff35f9 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--src/xf86libinput.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/xf86libinput.c b/src/xf86libinput.c
index 061e495..24219a6 100644
--- a/src/xf86libinput.c
+++ b/src/xf86libinput.c
@@ -1158,12 +1158,20 @@ swap_registered_device(InputInfoPtr pInfo)
while (next == pInfo || !is_libinput_device(next))
next = next->next;
+#if HAVE_THREADED_INPUT
input_lock();
+#else
+ int sigstate = xf86BlockSIGIO();
+#endif
xf86RemoveEnabledDevice(pInfo);
if (next) /* shouldn't ever be NULL anyway */
xf86AddEnabledDevice(next);
driver_context.registered_InputInfoPtr = next;
+#if HAVE_THREADED_INPUT
input_unlock();
+#else
+ xf86UnblockSIGIO(sigstate);
+#endif
}
static void