summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/xfree86/common/xf86Events.c20
-rw-r--r--hw/xfree86/os-support/linux/lnx_init.c1
2 files changed, 21 insertions, 0 deletions
diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c
index 5503e2425..d9157b163 100644
--- a/hw/xfree86/common/xf86Events.c
+++ b/hw/xfree86/common/xf86Events.c
@@ -1735,6 +1735,26 @@ XTestGenerateEvent(int dev_type, int keycode, int keystate, int mousex,
#endif /* XTESTEXT1 */
+void
+xf86ReloadInputDevs(int sig)
+{
+ InputInfoPtr pInfo;
+
+ signal(sig, (void(*)(int))xf86ReloadInputDevs);
+
+ DisableDevice((DeviceIntPtr)xf86Info.pKeyboard);
+ EnableDevice((DeviceIntPtr)xf86Info.pKeyboard);
+
+ pInfo = xf86InputDevs;
+ while (pInfo) {
+ DisableDevice(pInfo->dev);
+ EnableDevice(pInfo->dev);
+ pInfo = pInfo->next;
+ }
+
+ return;
+}
+
#ifdef WSCONS_SUPPORT
/* XXX Currently XKB is mandatory. */
diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c
index a52073d0a..9933c6f7b 100644
--- a/hw/xfree86/os-support/linux/lnx_init.c
+++ b/hw/xfree86/os-support/linux/lnx_init.c
@@ -289,6 +289,7 @@ xf86OpenConsole(void)
} else { /* ShareVTs */
close(xf86Info.consoleFd);
}
+ signal(SIGUSR2, xf86ReloadInputDevs);
} else { /* serverGeneration != 1 */
if (!ShareVTs && VTSwitch)
{