--- a/hw/xfree86/common/xf86cmap.c +++ b/hw/xfree86/common/xf86cmap.c @@ -472,16 +476,19 @@ CMapEnterVT(int index, int flags) CMapScreenPtr pScreenPriv = (CMapScreenPtr)dixLookupPrivate( &pScreen->devPrivates, CMapScreenKey); + void *tmp = pScrn->EnterVT; pScrn->EnterVT = pScreenPriv->EnterVT; ret = (*pScreenPriv->EnterVT)(index, flags); pScreenPriv->EnterVT = pScrn->EnterVT; - pScrn->EnterVT = CMapEnterVT; + pScrn->EnterVT = tmp; + if(ret) { if(GetInstalledmiColormap(pScreen)) CMapReinstallMap(GetInstalledmiColormap(pScreen)); return TRUE; } return FALSE; + } diff --git a/hw/xfree86/common/xf86xv.c b/hw/xfree86/common/xf86xv.c index c1d3199..41e24ea 100644 --- a/hw/xfree86/common/xf86xv.c +++ b/hw/xfree86/common/xf86xv.c @@ -1234,10 +1234,11 @@ xf86XVEnterVT(int index, int flags) XF86XVScreenPtr ScreenPriv = GET_XF86XV_SCREEN(pScreen); Bool ret; + void *tmp = pScrn->EnterVT; pScrn->EnterVT = ScreenPriv->EnterVT; ret = (*ScreenPriv->EnterVT)(index, flags); ScreenPriv->EnterVT = pScrn->EnterVT; - pScrn->EnterVT = xf86XVEnterVT; + pScrn->EnterVT = tmp; if(ret) WalkTree(pScreen, xf86XVReputAllVideo, 0);