forked from pool/xorg-x11-server
102 lines
2.9 KiB
Diff
102 lines
2.9 KiB
Diff
--- os/WaitFor.c.orig 2007-01-26 15:53:27.000000000 +0100
|
|
+++ os/WaitFor.c 2007-01-29 11:24:14.000000000 +0100
|
|
@@ -144,6 +144,7 @@ static OsTimerPtr timers = NULL;
|
|
* 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)
|
|
@@ -298,10 +299,9 @@ WaitForSomething(int *pClientsReady)
|
|
if (expired)
|
|
return 0;
|
|
}
|
|
- }
|
|
+ }
|
|
else
|
|
- {
|
|
- fd_set tmp_set;
|
|
+ {
|
|
|
|
if (*checkForInput[0] == *checkForInput[1]) {
|
|
if (timers)
|
|
@@ -338,7 +338,8 @@ WaitForSomething(int *pClientsReady)
|
|
QueueWorkProc(EstablishNewConnections, NULL,
|
|
(pointer)&LastSelectMask);
|
|
#ifdef DPMSExtension
|
|
- if (XFD_ANYSET (&devicesReadable) && (DPMSPowerLevel != DPMSModeOn))
|
|
+ XFD_ANDSET(&tmp_set, &devicesReadable, &EnabledDevices);
|
|
+ if (XFD_ANYSET (&tmp_set) && (DPMSPowerLevel != DPMSModeOn))
|
|
DPMSSet(DPMSModeOn);
|
|
#endif
|
|
if (XFD_ANYSET (&devicesReadable) || XFD_ANYSET (&clientsReadable))
|
|
--- hw/xfree86/common/xf86Events.c.orig_1 2007-02-01 10:18:02.000000000 +0100
|
|
+++ hw/xfree86/common/xf86Events.c 2007-02-01 10:43:54.000000000 +0100
|
|
@@ -164,6 +164,7 @@ typedef struct x_IHRec {
|
|
InputHandlerProc ihproc;
|
|
pointer data;
|
|
Bool enabled;
|
|
+ Bool is_input;
|
|
struct x_IHRec * next;
|
|
} IHRec, *IHPtr;
|
|
|
|
@@ -1526,8 +1527,12 @@ xf86VTSwitch()
|
|
for (i = 0; i < xf86NumScreens; i++)
|
|
xf86Screens[i]->LeaveVT(i, 0);
|
|
|
|
- for (ih = InputHandlers; ih; ih = ih->next)
|
|
- xf86DisableInputHandler(ih);
|
|
+ for (ih = InputHandlers; ih; ih = ih->next) {
|
|
+ if (ih->is_input)
|
|
+ xf86DisableInputHandler(ih);
|
|
+ else
|
|
+ xf86DisableGeneralHandler(ih);
|
|
+ }
|
|
xf86AccessLeave(); /* We need this here, otherwise */
|
|
xf86AccessLeaveState(); /* console won't be restored */
|
|
|
|
@@ -1563,9 +1568,12 @@ xf86VTSwitch()
|
|
pInfo = pInfo->next;
|
|
}
|
|
#endif /* !__UNIXOS2__ */
|
|
- 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);
|
|
+ }
|
|
xf86UnblockSIGIO(prevSIGIO);
|
|
|
|
} else {
|
|
@@ -1626,8 +1634,12 @@ xf86VTSwitch()
|
|
}
|
|
#endif /* !__UNIXOS2__ */
|
|
|
|
- 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);
|
|
+ }
|
|
|
|
xf86UnblockSIGIO(prevSIGIO);
|
|
}
|
|
@@ -1664,8 +1676,10 @@ xf86AddInputHandler(int fd, InputHandler
|
|
{
|
|
IHPtr ih = addInputHandler(fd, proc, data);
|
|
|
|
- if (ih)
|
|
+ if (ih) {
|
|
AddEnabledDevice(fd);
|
|
+ ih->is_input = TRUE;
|
|
+ }
|
|
return ih;
|
|
}
|
|
|