summaryrefslogtreecommitdiff
path: root/src/xf86libinput.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xf86libinput.c')
-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