xorg-x11-server/events.diff
OBS User autobuild de140e0677 Accepting request 19080 from X11:XOrg
Copy from X11:XOrg/xorg-x11-server based on submit request 19080 from user sndirsch

OBS-URL: https://build.opensuse.org/request/show/19080
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/xorg-x11-server?expand=0&rev=138
2009-08-28 18:30:20 +00:00

90 lines
2.4 KiB
Diff

Index: xorg-server-1.6.3.901/hw/xfree86/common/xf86Events.c
===================================================================
--- xorg-server-1.6.3.901.orig/hw/xfree86/common/xf86Events.c
+++ xorg-server-1.6.3.901/hw/xfree86/common/xf86Events.c
@@ -518,22 +518,26 @@ xf86VTSwitch()
* 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 */
@@ -563,14 +567,10 @@ xf86VTSwitch()
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);
@@ -580,6 +580,17 @@ xf86VTSwitch()
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();
@@ -630,14 +641,10 @@ xf86VTSwitch()
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)