Block IO on switchmode just as we do for VT switching

to avoid cursor movements signalling io.
This commit is contained in:
Alan Hourihane 2006-10-13 14:48:10 +01:00
parent a6df780e4d
commit cf948b7b04

View File

@ -213,6 +213,7 @@ xf86SwitchMode(ScreenPtr pScreen, DisplayModePtr mode)
ScreenPtr pCursorScreen;
Bool Switched;
int px, py;
int sigstate;
if (!pScr->vtSema || !mode || !pScr->SwitchMode)
return FALSE;
@ -232,6 +233,7 @@ xf86SwitchMode(ScreenPtr pScreen, DisplayModePtr mode)
if (pScreen == pCursorScreen)
miPointerPosition(&px, &py);
sigstate = xf86BlockSIGIO ();
xf86EnterServerState(SETUP);
Switched = (*pScr->SwitchMode)(pScr->scrnIndex, mode, 0);
xf86EnterServerState(OPERATING);
@ -269,6 +271,7 @@ xf86SwitchMode(ScreenPtr pScreen, DisplayModePtr mode)
pScr->frameY1 = pScr->virtualY - 1;
}
}
xf86UnblockSIGIO (sigstate);
if (pScr->AdjustFrame)
(*pScr->AdjustFrame)(pScr->scrnIndex, pScr->frameX0, pScr->frameY0, 0);