[PATCH] glx/glxdri2: Unwrap EnterVT/LeaveVT upon CloseScreen

Chris Wilson chris at chris-wilson.co.uk
Sat Oct 5 00:49:17 PDT 2013


In a similar spirit to

commit d75e8146c414bfd512ba5dbd4a83acb334bbe19b
Author: Keith Packard <keithp at keithp.com>
Date:   Mon Jul 12 16:01:34 2010 -0700

    Unwrap/rewrap EnterVT/LeaveVT completely, Fixes 28998

we need to unwrap our pScrn->EnterVT/LeaveVT hooks around server
regeneration or else we cause an infinite recursion on the next VT
switch afterwards.

Bugzilla: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1235516
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
 glx/glxdri2.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/glx/glxdri2.c b/glx/glxdri2.c
index 8a1fa41..57c4735 100644
--- a/glx/glxdri2.c
+++ b/glx/glxdri2.c
@@ -375,6 +375,7 @@ __glXDRIscreenDestroy(__GLXscreen * baseScreen)
 {
     int i;
 
+    ScrnInfoPtr pScrn = xf86ScreenToScrn(baseScreen->pScreen);
     __GLXDRIscreen *screen = (__GLXDRIscreen *) baseScreen;
 
     (*screen->core->destroyScreen) (screen->driScreen);
@@ -389,6 +390,9 @@ __glXDRIscreenDestroy(__GLXscreen * baseScreen)
         free(screen->driConfigs);
     }
 
+    pScrn->EnterVT = screen->enterVT;
+    pScrn->LeaveVT = screen->leaveVT;
+
     free(screen);
 }
 
-- 
1.8.4.rc3



More information about the xorg-devel mailing list