glx/glxdri2: Unwrap EnterVT/LeaveVT upon CloseScreen

In a similar spirit to

commit d75e8146c4
Author: Keith Packard <keithp@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@chris-wilson.co.uk>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Chris Wilson 2013-10-05 08:47:03 +01:00 committed by Keith Packard
parent 6d5883bd7e
commit e7000534a4

View File

@ -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);
}