Subvert SIGUSR2 to reload all input devices. (Ubuntu #020)
This commit is contained in:
parent
89c84575ea
commit
3075df24e7
|
@ -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. */
|
||||
|
|
|
@ -289,6 +289,7 @@ xf86OpenConsole(void)
|
|||
} else { /* ShareVTs */
|
||||
close(xf86Info.consoleFd);
|
||||
}
|
||||
signal(SIGUSR2, xf86ReloadInputDevs);
|
||||
} else { /* serverGeneration != 1 */
|
||||
if (!ShareVTs && VTSwitch)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user