diff options
author | Keith Packard <keithp@keithp.com> | 2010-07-12 16:01:34 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2010-07-13 09:58:04 -0700 |
commit | d75e8146c414bfd512ba5dbd4a83acb334bbe19b (patch) | |
tree | b870671a16ef432871a1391207c287fee1ceae01 /hw/xfree86/shadowfb | |
parent | 3209b094a3b1466b579e8020e12a4f3fa78a5f3f (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/shadowfb')
-rw-r--r-- | hw/xfree86/shadowfb/shadow.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/hw/xfree86/shadowfb/shadow.c b/hw/xfree86/shadowfb/shadow.c index 977398177..344f1abf7 100644 --- a/hw/xfree86/shadowfb/shadow.c +++ b/hw/xfree86/shadowfb/shadow.c @@ -216,9 +216,14 @@ static Bool ShadowEnterVT(int index, int flags) { ScrnInfoPtr pScrn = xf86Screens[index]; + Bool ret; ShadowScreenPtr pPriv = GET_SCREEN_PRIVATE(pScrn->pScreen); - if((*pPriv->EnterVT)(index, flags)) { + pScrn->EnterVT = pPriv->EnterVT; + ret = (*pPriv->EnterVT)(index, flags); + pPriv->EnterVT = pScrn->EnterVT; + pScrn->EnterVT = ShadowEnterVT; + if(ret) { pPriv->vtSema = TRUE; return TRUE; } @@ -229,11 +234,15 @@ ShadowEnterVT(int index, int flags) static void ShadowLeaveVT(int index, int flags) { + ScrnInfoPtr pScrn = xf86Screens[index]; ShadowScreenPtr pPriv = GET_SCREEN_PRIVATE(xf86Screens[index]->pScreen); pPriv->vtSema = FALSE; + pScrn->LeaveVT = pPriv->LeaveVT; (*pPriv->LeaveVT)(index, flags); + pPriv->LeaveVT = pScrn->LeaveVT; + pScrn->LeaveVT = ShadowLeaveVT; } /**********************************************************/ |