summaryrefslogtreecommitdiff
path: root/hw/xfree86/common/xf86cmap.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/common/xf86cmap.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/common/xf86cmap.c')
-rw-r--r--hw/xfree86/common/xf86cmap.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/hw/xfree86/common/xf86cmap.c b/hw/xfree86/common/xf86cmap.c
index d2a8f12b8..8b27b8418 100644
--- a/hw/xfree86/common/xf86cmap.c
+++ b/hw/xfree86/common/xf86cmap.c
@@ -466,11 +466,17 @@ CMapInstallColormap(ColormapPtr pmap)
static Bool
CMapEnterVT(int index, int flags)
{
+ ScrnInfoPtr pScrn = xf86Screens[index];
ScreenPtr pScreen = screenInfo.screens[index];
+ Bool ret;
CMapScreenPtr pScreenPriv = (CMapScreenPtr)dixLookupPrivate(
&pScreen->devPrivates, CMapScreenKey);
- if((*pScreenPriv->EnterVT)(index, flags)) {
+ pScrn->EnterVT = pScreenPriv->EnterVT;
+ ret = (*pScreenPriv->EnterVT)(index, flags);
+ pScreenPriv->EnterVT = pScrn->EnterVT;
+ pScrn->EnterVT = CMapEnterVT;
+ if(ret) {
if(GetInstalledmiColormap(pScreen))
CMapReinstallMap(GetInstalledmiColormap(pScreen));
return TRUE;