2009-08-04 21:52:16 +02:00
|
|
|
Index: hw/xfree86/common/xf86Events.c
|
2010-01-18 14:04:02 +01:00
|
|
|
================================================================================
|
|
|
|
--- hw/xfree86/common/xf86Events.c
|
2009-08-04 21:52:16 +02:00
|
|
|
+++ hw/xfree86/common/xf86Events.c
|
2010-01-18 14:04:02 +01:00
|
|
|
@@ -115,6 +115,7 @@
|
2007-02-02 16:10:04 +01:00
|
|
|
InputHandlerProc ihproc;
|
|
|
|
pointer data;
|
|
|
|
Bool enabled;
|
|
|
|
+ Bool is_input;
|
|
|
|
struct x_IHRec * next;
|
|
|
|
} IHRec, *IHPtr;
|
2007-01-29 17:36:20 +01:00
|
|
|
|
2010-03-20 03:42:15 +01:00
|
|
|
@@ -449,8 +450,12 @@
|
2010-01-18 14:04:02 +01:00
|
|
|
* Keep the order: Disable Device > LeaveVT
|
|
|
|
* EnterVT > EnableDevice
|
|
|
|
*/
|
2007-02-02 16:10:04 +01:00
|
|
|
- for (ih = InputHandlers; ih; ih = ih->next)
|
|
|
|
- xf86DisableInputHandler(ih);
|
|
|
|
+ for (ih = InputHandlers; ih; ih = ih->next) {
|
2010-01-18 14:04:02 +01:00
|
|
|
+ if (ih->is_input)
|
|
|
|
+ xf86DisableInputHandler(ih);
|
|
|
|
+ else
|
|
|
|
+ xf86DisableGeneralHandler(ih);
|
2007-02-02 16:10:04 +01:00
|
|
|
+ }
|
2010-01-18 14:04:02 +01:00
|
|
|
for (pInfo = xf86InputDevs; pInfo; pInfo = pInfo->next) {
|
|
|
|
if (pInfo->dev) {
|
|
|
|
xf86ReleaseKeys(pInfo->dev);
|
2010-03-20 03:42:15 +01:00
|
|
|
@@ -492,8 +497,12 @@
|
2010-01-18 14:04:02 +01:00
|
|
|
EnableDevice(pInfo->dev, TRUE);
|
|
|
|
pInfo = pInfo->next;
|
2007-02-02 16:10:04 +01:00
|
|
|
}
|
|
|
|
- for (ih = InputHandlers; ih; ih = ih->next)
|
|
|
|
- xf86EnableInputHandler(ih);
|
|
|
|
+ for (ih = InputHandlers; ih; ih = ih->next) {
|
2007-10-03 01:21:25 +02:00
|
|
|
+ if (ih->is_input)
|
|
|
|
+ xf86EnableInputHandler(ih);
|
|
|
|
+ else
|
|
|
|
+ xf86EnableGeneralHandler(ih);
|
2007-02-02 16:10:04 +01:00
|
|
|
+ }
|
2010-01-18 14:04:02 +01:00
|
|
|
|
2007-02-02 16:10:04 +01:00
|
|
|
xf86UnblockSIGIO(prevSIGIO);
|
|
|
|
|
2010-03-20 03:42:15 +01:00
|
|
|
@@ -549,8 +558,12 @@
|
2010-01-18 14:04:02 +01:00
|
|
|
pInfo = pInfo->next;
|
|
|
|
}
|
2007-10-03 01:21:25 +02:00
|
|
|
|
2007-02-02 16:10:04 +01:00
|
|
|
- for (ih = InputHandlers; ih; ih = ih->next)
|
|
|
|
- xf86EnableInputHandler(ih);
|
|
|
|
+ for (ih = InputHandlers; ih; ih = ih->next) {
|
2007-10-03 01:21:25 +02:00
|
|
|
+ if (ih->is_input)
|
|
|
|
+ xf86EnableInputHandler(ih);
|
|
|
|
+ else
|
|
|
|
+ xf86EnableGeneralHandler(ih);
|
|
|
|
+ }
|
2007-02-02 16:10:04 +01:00
|
|
|
|
|
|
|
xf86UnblockSIGIO(prevSIGIO);
|
|
|
|
}
|
2010-03-20 03:42:15 +01:00
|
|
|
@@ -587,8 +600,10 @@
|
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;
|
|
|
|
}
|
|
|
|
|
2010-01-18 14:04:02 +01:00
|
|
|
--- os/WaitFor.c
|
2009-08-04 21:52:16 +02:00
|
|
|
+++ os/WaitFor.c
|
2010-01-18 14:04:02 +01:00
|
|
|
@@ -142,6 +142,7 @@
|
2009-08-04 21:52:16 +02:00
|
|
|
* For more info on ClientsWithInput, see ReadRequestFromClient().
|
|
|
|
* pClientsReady is an array to store ready client->index values into.
|
|
|
|
*****************/
|
|
|
|
+volatile fd_set tmp_set;
|
|
|
|
|
|
|
|
int
|
|
|
|
WaitForSomething(int *pClientsReady)
|
2010-01-18 14:04:02 +01:00
|
|
|
@@ -279,10 +280,9 @@
|
2009-08-04 21:52:16 +02:00
|
|
|
if (expired)
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
- }
|
|
|
|
+ }
|
|
|
|
else
|
|
|
|
- {
|
|
|
|
- fd_set tmp_set;
|
|
|
|
+ {
|
|
|
|
|
|
|
|
if (*checkForInput[0] == *checkForInput[1]) {
|
|
|
|
if (timers)
|
2010-01-18 14:04:02 +01:00
|
|
|
@@ -317,6 +317,12 @@
|
2009-08-04 21:52:16 +02:00
|
|
|
QueueWorkProc(EstablishNewConnections, NULL,
|
|
|
|
(pointer)&LastSelectMask);
|
|
|
|
|
|
|
|
+#ifdef DPMSExtension
|
|
|
|
+ XFD_ANDSET(&tmp_set, &devicesReadable, &EnabledDevices);
|
|
|
|
+ if (XFD_ANYSET (&tmp_set) && (DPMSPowerLevel != DPMSModeOn))
|
|
|
|
+ DPMSSet(serverClient, DPMSModeOn);
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
if (XFD_ANYSET (&devicesReadable) || XFD_ANYSET (&clientsReadable))
|
|
|
|
break;
|
|
|
|
/* check here for DDXes that queue events during Block/Wakeup */
|