From: Chris Wilson Date: Sat, 5 Oct 2013 07:47:03 +0000 (+0100) Subject: glx/glxdri2: Unwrap EnterVT/LeaveVT upon CloseScreen X-Git-Tag: xorg-server-1.14.99.903~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e7000534a456fdf9cd4eaada3193846c8525f740;p=platform%2Fupstream%2Fxorg-server.git glx/glxdri2: Unwrap EnterVT/LeaveVT upon CloseScreen In a similar spirit to commit d75e8146c414bfd512ba5dbd4a83acb334bbe19b Author: Keith Packard 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 Reviewed-by: Keith Packard Signed-off-by: Keith Packard --- diff --git a/glx/glxdri2.c b/glx/glxdri2.c index 1d74c8f..fbbd1fd 100644 --- a/glx/glxdri2.c +++ b/glx/glxdri2.c @@ -371,6 +371,7 @@ __glXDRIscreenDestroy(__GLXscreen * baseScreen) { int i; + ScrnInfoPtr pScrn = xf86ScreenToScrn(baseScreen->pScreen); __GLXDRIscreen *screen = (__GLXDRIscreen *) baseScreen; (*screen->core->destroyScreen) (screen->driScreen); @@ -385,6 +386,9 @@ __glXDRIscreenDestroy(__GLXscreen * baseScreen) free(screen->driConfigs); } + pScrn->EnterVT = screen->enterVT; + pScrn->LeaveVT = screen->leaveVT; + free(screen); }