2009-08-28 20:30:20 +02:00
|
|
|
Index: xorg-server-1.6.3.901/hw/xfree86/common/xf86Events.c
|
2009-08-04 21:52:16 +02:00
|
|
|
===================================================================
|
2009-08-28 20:30:20 +02:00
|
|
|
--- xorg-server-1.6.3.901.orig/hw/xfree86/common/xf86Events.c
|
|
|
|
+++ xorg-server-1.6.3.901/hw/xfree86/common/xf86Events.c
|
2009-08-04 21:52:16 +02:00
|
|
|
@@ -518,22 +518,26 @@ xf86VTSwitch()
|
2008-04-22 00:05:44 +02:00
|
|
|
* Keep the order: Disable Device > LeaveVT
|
|
|
|
* EnterVT > EnableDevice
|
|
|
|
*/
|
|
|
|
+
|
|
|
|
+ for (i = 0; i < xf86NumScreens; i++)
|
|
|
|
+ xf86Screens[i]->LeaveVT(i, 0);
|
|
|
|
+
|
|
|
|
+ for (ih = InputHandlers; ih; ih = ih->next) {
|
|
|
|
+ if (ih->is_input)
|
|
|
|
+ xf86DisableInputHandler(ih);
|
|
|
|
+ else
|
|
|
|
+ xf86DisableGeneralHandler(ih);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
pInfo = xf86InputDevs;
|
|
|
|
while (pInfo) {
|
|
|
|
if (pInfo->dev)
|
|
|
|
DisableDevice(pInfo->dev);
|
|
|
|
pInfo = pInfo->next;
|
|
|
|
}
|
|
|
|
+ /* XXX HACK */
|
|
|
|
xf86EnterServerState(SETUP);
|
|
|
|
- for (i = 0; i < xf86NumScreens; i++)
|
|
|
|
- xf86Screens[i]->LeaveVT(i, 0);
|
|
|
|
|
|
|
|
- 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 */
|
|
|
|
|
2009-08-04 21:52:16 +02:00
|
|
|
@@ -563,14 +567,10 @@ xf86VTSwitch()
|
2008-04-22 00:05:44 +02:00
|
|
|
|
|
|
|
pInfo = xf86InputDevs;
|
|
|
|
while (pInfo) {
|
|
|
|
- if (pInfo->dev) {
|
|
|
|
- xf86ReleaseKeys(pInfo->dev);
|
|
|
|
+ if (pInfo->dev)
|
|
|
|
EnableDevice(pInfo->dev);
|
|
|
|
- }
|
|
|
|
pInfo = pInfo->next;
|
|
|
|
}
|
|
|
|
- /* XXX HACK */
|
|
|
|
- xf86ReleaseKeys(inputInfo.keyboard);
|
|
|
|
for (ih = InputHandlers; ih; ih = ih->next) {
|
|
|
|
if (ih->is_input)
|
|
|
|
xf86EnableInputHandler(ih);
|
2009-08-04 21:52:16 +02:00
|
|
|
@@ -580,6 +580,17 @@ xf86VTSwitch()
|
2008-04-22 00:05:44 +02:00
|
|
|
xf86UnblockSIGIO(prevSIGIO);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
+
|
|
|
|
+ pInfo = xf86InputDevs;
|
|
|
|
+ while (pInfo) {
|
|
|
|
+ if (pInfo->dev) {
|
|
|
|
+ xf86ReleaseKeys(pInfo->dev);
|
|
|
|
+ }
|
|
|
|
+ pInfo = pInfo->next;
|
|
|
|
+ }
|
|
|
|
+ /* XXX HACK */
|
|
|
|
+ xf86ReleaseKeys(inputInfo.keyboard);
|
|
|
|
+
|
|
|
|
#ifdef XF86PM
|
|
|
|
if (xf86OSPMClose)
|
|
|
|
xf86OSPMClose();
|
2009-08-04 21:52:16 +02:00
|
|
|
@@ -630,14 +641,10 @@ xf86VTSwitch()
|
2008-04-22 00:05:44 +02:00
|
|
|
|
|
|
|
pInfo = xf86InputDevs;
|
|
|
|
while (pInfo) {
|
|
|
|
- if (pInfo->dev) {
|
|
|
|
- xf86ReleaseKeys(pInfo->dev);
|
|
|
|
+ if (pInfo->dev)
|
|
|
|
EnableDevice(pInfo->dev);
|
|
|
|
- }
|
|
|
|
pInfo = pInfo->next;
|
|
|
|
}
|
|
|
|
- /* XXX HACK */
|
|
|
|
- xf86ReleaseKeys(inputInfo.keyboard);
|
|
|
|
|
|
|
|
for (ih = InputHandlers; ih; ih = ih->next) {
|
|
|
|
if (ih->is_input)
|