2009-08-04 21:52:16 +02:00
|
|
|
Index: hw/xfree86/common/xf86Events.c
|
2012-04-20 11:32:05 +02:00
|
|
|
===================================================================
|
|
|
|
--- hw/xfree86/common/xf86Events.c.orig
|
2009-08-04 21:52:16 +02:00
|
|
|
+++ hw/xfree86/common/xf86Events.c
|
2012-04-20 11:32:05 +02:00
|
|
|
@@ -115,6 +115,7 @@ typedef struct x_IHRec {
|
|
|
|
InputHandlerProc ihproc;
|
|
|
|
pointer data;
|
|
|
|
Bool enabled;
|
|
|
|
+ Bool is_input;
|
|
|
|
struct x_IHRec *next;
|
2007-02-02 16:10:04 +01:00
|
|
|
} IHRec, *IHPtr;
|
2007-01-29 17:36:20 +01:00
|
|
|
|
2012-04-20 11:32:05 +02:00
|
|
|
@@ -445,9 +446,13 @@ xf86VTSwitch(void)
|
|
|
|
* Keep the order: Disable Device > LeaveVT
|
|
|
|
* EnterVT > EnableDevice
|
|
|
|
*/
|
|
|
|
- for (ih = InputHandlers; ih; ih = ih->next)
|
|
|
|
+ for (ih = InputHandlers; ih; ih = ih->next) {
|
|
|
|
+ if (ih->is_input)
|
|
|
|
xf86DisableInputHandler(ih);
|
|
|
|
- for (pInfo = xf86InputDevs; pInfo; pInfo = pInfo->next) {
|
|
|
|
+ else
|
|
|
|
+ xf86DisableGeneralHandler(ih);
|
|
|
|
+ }
|
|
|
|
+ for (pInfo = xf86InputDevs; pInfo; pInfo = pInfo->next) {
|
|
|
|
if (pInfo->dev) {
|
|
|
|
xf86ReleaseKeys(pInfo->dev);
|
|
|
|
ProcessInputEvents();
|
|
|
|
@@ -486,8 +491,12 @@ xf86VTSwitch(void)
|
|
|
|
EnableDevice(pInfo->dev, TRUE);
|
|
|
|
pInfo = pInfo->next;
|
|
|
|
}
|
|
|
|
- for (ih = InputHandlers; ih; ih = ih->next)
|
|
|
|
- xf86EnableInputHandler(ih);
|
|
|
|
+ for (ih = InputHandlers; ih; ih = ih->next) {
|
|
|
|
+ if (ih->is_input)
|
|
|
|
+ xf86EnableInputHandler(ih);
|
|
|
|
+ else
|
|
|
|
+ xf86EnableGeneralHandler(ih);
|
|
|
|
+ }
|
2010-01-18 14:04:02 +01:00
|
|
|
|
2012-04-20 11:32:05 +02:00
|
|
|
xf86UnblockSIGIO(prevSIGIO);
|
2007-02-02 16:10:04 +01:00
|
|
|
|
2012-04-20 11:32:05 +02:00
|
|
|
@@ -542,8 +551,12 @@ xf86VTSwitch(void)
|
|
|
|
pInfo = pInfo->next;
|
|
|
|
}
|
2007-10-03 01:21:25 +02:00
|
|
|
|
2012-04-20 11:32:05 +02:00
|
|
|
- for (ih = InputHandlers; ih; ih = ih->next)
|
|
|
|
- xf86EnableInputHandler(ih);
|
|
|
|
+ for (ih = InputHandlers; ih; ih = ih->next) {
|
|
|
|
+ if (ih->is_input)
|
|
|
|
+ xf86EnableInputHandler(ih);
|
|
|
|
+ else
|
|
|
|
+ xf86EnableGeneralHandler(ih);
|
|
|
|
+ }
|
2007-02-02 16:10:04 +01:00
|
|
|
|
2012-04-20 11:32:05 +02:00
|
|
|
xf86UnblockSIGIO(prevSIGIO);
|
|
|
|
}
|
|
|
|
@@ -579,8 +592,10 @@ xf86AddInputHandler(int fd, InputHandler
|
2007-10-03 01:21:25 +02:00
|
|
|
{
|
2007-01-29 17:36:20 +01:00
|
|
|
IHPtr ih = addInputHandler(fd, proc, data);
|
|
|
|
|
|
|
|
- if (ih)
|
|
|
|
+ if (ih) {
|
|
|
|
AddEnabledDevice(fd);
|
2007-02-02 16:10:04 +01:00
|
|
|
+ ih->is_input = TRUE;
|
2007-01-29 17:36:20 +01:00
|
|
|
+ }
|
|
|
|
return ih;
|
|
|
|
}
|
|
|
|
|