diff options
Diffstat (limited to 'xorg-server/glx/glxdri.c')
-rw-r--r-- | xorg-server/glx/glxdri.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/xorg-server/glx/glxdri.c b/xorg-server/glx/glxdri.c index 73f6051f6..2733cb856 100644 --- a/xorg-server/glx/glxdri.c +++ b/xorg-server/glx/glxdri.c @@ -869,12 +869,21 @@ static const char dri_driver_path[] = DRI_DRIVER_PATH; static Bool
glxDRIEnterVT (int index, int flags)
{
+ ScrnInfoPtr scrn = xf86Screens[index];
+ Bool ret;
__GLXDRIscreen *screen = (__GLXDRIscreen *)
glxGetScreen(screenInfo.screens[index]);
LogMessage(X_INFO, "AIGLX: Resuming AIGLX clients after VT switch\n");
- if (!(*screen->enterVT) (index, flags))
+ scrn->EnterVT = screen->enterVT;
+
+ ret = scrn->EnterVT (index, flags);
+
+ screen->enterVT = scrn->EnterVT;
+ scrn->EnterVT = glxDRIEnterVT;
+
+ if (!ret)
return FALSE;
glxResumeClients();
@@ -885,6 +894,7 @@ glxDRIEnterVT (int index, int flags) static void
glxDRILeaveVT (int index, int flags)
{
+ ScrnInfoPtr scrn = xf86Screens[index];
__GLXDRIscreen *screen = (__GLXDRIscreen *)
glxGetScreen(screenInfo.screens[index]);
@@ -892,7 +902,10 @@ glxDRILeaveVT (int index, int flags) glxSuspendClients();
- return (*screen->leaveVT) (index, flags);
+ scrn->LeaveVT = screen->leaveVT;
+ (*screen->leaveVT) (index, flags);
+ screen->leaveVT = scrn->LeaveVT;
+ scrn->LeaveVT = glxDRILeaveVT;
}
static void
|