summaryrefslogtreecommitdiff
path: root/hw/xfree86/xaa/xaaInit.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2010-07-12 16:01:34 -0700
committerKeith Packard <keithp@keithp.com>2010-07-13 09:58:04 -0700
commitd75e8146c414bfd512ba5dbd4a83acb334bbe19b (patch)
treeb870671a16ef432871a1391207c287fee1ceae01 /hw/xfree86/xaa/xaaInit.c
parent3209b094a3b1466b579e8020e12a4f3fa78a5f3f (diff)
Unwrap/rewrap EnterVT/LeaveVT completely, Fixes 28998
Because some EnterVT code needs to remove it self from the call chain, we need to fix all of the wrappers to correctly unwrap/rewrap during the call chain. This is a follow-on to the fix for bug 27114 in commit 68a9ee8370e6f9b38218376ac92d5130a5b0ef1e. Signed-off-by: Keith Packard <keithp@keithp.com> Tested-by: Jesse Barnes <jesse.barnes@intel.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Diffstat (limited to 'hw/xfree86/xaa/xaaInit.c')
-rw-r--r--hw/xfree86/xaa/xaaInit.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/hw/xfree86/xaa/xaaInit.c b/hw/xfree86/xaa/xaaInit.c
index ec55632e9..11443a60e 100644
--- a/hw/xfree86/xaa/xaaInit.c
+++ b/hw/xfree86/xaa/xaaInit.c
@@ -508,16 +508,23 @@ XAAChangeWindowAttributes (WindowPtr pWin, unsigned long mask)
static Bool
XAAEnterVT(int index, int flags)
{
+ ScrnInfoPtr pScrn = xf86Screens[index];
+ Bool ret;
ScreenPtr pScreen = screenInfo.screens[index];
XAAScreenPtr pScreenPriv =
(XAAScreenPtr)dixLookupPrivate(&pScreen->devPrivates, XAAScreenKey);
- return((*pScreenPriv->EnterVT)(index, flags));
+ pScrn->EnterVT = pScreenPriv->EnterVT;
+ ret = ((*pScreenPriv->EnterVT)(index, flags));
+ pScreenPriv->EnterVT = pScrn->EnterVT;
+ pScrn->EnterVT = XAAEnterVT;
+ return ret;
}
static void
XAALeaveVT(int index, int flags)
{
+ ScrnInfoPtr pScrn = xf86Screens[index];
ScreenPtr pScreen = screenInfo.screens[index];
XAAScreenPtr pScreenPriv =
(XAAScreenPtr)dixLookupPrivate(&pScreen->devPrivates, XAAScreenKey);
@@ -528,7 +535,10 @@ XAALeaveVT(int index, int flags)
infoRec->NeedToSync = FALSE;
}
+ pScrn->LeaveVT = pScreenPriv->LeaveVT;
(*pScreenPriv->LeaveVT)(index, flags);
+ pScreenPriv->LeaveVT = pScrn->LeaveVT;
+ pScrn->LeaveVT = XAALeaveVT;
}
typedef struct {