aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/glx
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/glx')
-rw-r--r--xorg-server/glx/glxdri.c14
-rw-r--r--xorg-server/glx/glxdri2.c14
-rw-r--r--xorg-server/glx/glxscreens.c4
-rw-r--r--xorg-server/glx/glxscreens.h2
4 files changed, 15 insertions, 19 deletions
diff --git a/xorg-server/glx/glxdri.c b/xorg-server/glx/glxdri.c
index b2209c551..f3690c859 100644
--- a/xorg-server/glx/glxdri.c
+++ b/xorg-server/glx/glxdri.c
@@ -846,18 +846,17 @@ static const __DRIextension *loader_extensions[] = {
};
static Bool
-glxDRIEnterVT(int index, int flags)
+glxDRIEnterVT(ScrnInfoPtr scrn)
{
- ScrnInfoPtr scrn = xf86Screens[index];
Bool ret;
__GLXDRIscreen *screen = (__GLXDRIscreen *)
- glxGetScreen(screenInfo.screens[index]);
+ glxGetScreen(xf86ScrnToScreen(scrn));
LogMessage(X_INFO, "AIGLX: Resuming AIGLX clients after VT switch\n");
scrn->EnterVT = screen->enterVT;
- ret = scrn->EnterVT(index, flags);
+ ret = scrn->EnterVT(scrn);
screen->enterVT = scrn->EnterVT;
scrn->EnterVT = glxDRIEnterVT;
@@ -871,18 +870,17 @@ glxDRIEnterVT(int index, int flags)
}
static void
-glxDRILeaveVT(int index, int flags)
+glxDRILeaveVT(ScrnInfoPtr scrn)
{
- ScrnInfoPtr scrn = xf86Screens[index];
__GLXDRIscreen *screen = (__GLXDRIscreen *)
- glxGetScreen(screenInfo.screens[index]);
+ glxGetScreen(xf86ScrnToScreen(scrn));
LogMessage(X_INFO, "AIGLX: Suspending AIGLX clients for VT switch\n");
glxSuspendClients();
scrn->LeaveVT = screen->leaveVT;
- (*screen->leaveVT) (index, flags);
+ (*screen->leaveVT) (scrn);
screen->leaveVT = scrn->LeaveVT;
scrn->LeaveVT = glxDRILeaveVT;
}
diff --git a/xorg-server/glx/glxdri2.c b/xorg-server/glx/glxdri2.c
index cceb12697..6614666ca 100644
--- a/xorg-server/glx/glxdri2.c
+++ b/xorg-server/glx/glxdri2.c
@@ -587,18 +587,17 @@ static const __DRIextension *loader_extensions[] = {
};
static Bool
-glxDRIEnterVT(int index, int flags)
+glxDRIEnterVT(ScrnInfoPtr scrn)
{
- ScrnInfoPtr scrn = xf86Screens[index];
Bool ret;
__GLXDRIscreen *screen = (__GLXDRIscreen *)
- glxGetScreen(screenInfo.screens[index]);
+ glxGetScreen(xf86ScrnToScreen(scrn));
LogMessage(X_INFO, "AIGLX: Resuming AIGLX clients after VT switch\n");
scrn->EnterVT = screen->enterVT;
- ret = scrn->EnterVT(index, flags);
+ ret = scrn->EnterVT(scrn);
screen->enterVT = scrn->EnterVT;
scrn->EnterVT = glxDRIEnterVT;
@@ -612,18 +611,17 @@ glxDRIEnterVT(int index, int flags)
}
static void
-glxDRILeaveVT(int index, int flags)
+glxDRILeaveVT(ScrnInfoPtr scrn)
{
- ScrnInfoPtr scrn = xf86Screens[index];
__GLXDRIscreen *screen = (__GLXDRIscreen *)
- glxGetScreen(screenInfo.screens[index]);
+ glxGetScreen(xf86ScrnToScreen(scrn));
LogMessage(X_INFO, "AIGLX: Suspending AIGLX clients for VT switch\n");
glxSuspendClients();
scrn->LeaveVT = screen->leaveVT;
- (*screen->leaveVT) (index, flags);
+ (*screen->leaveVT) (scrn);
screen->leaveVT = scrn->LeaveVT;
scrn->LeaveVT = glxDRILeaveVT;
}
diff --git a/xorg-server/glx/glxscreens.c b/xorg-server/glx/glxscreens.c
index 74b4c421b..386987e26 100644
--- a/xorg-server/glx/glxscreens.c
+++ b/xorg-server/glx/glxscreens.c
@@ -177,7 +177,7 @@ static char GLXServerExtensions[] =
"GLX_SGIX_pbuffer " "GLX_MESA_copy_sub_buffer " "GLX_INTEL_swap_event";
static Bool
-glxCloseScreen(int index, ScreenPtr pScreen)
+glxCloseScreen(ScreenPtr pScreen)
{
__GLXscreen *pGlxScreen = glxGetScreen(pScreen);
@@ -185,7 +185,7 @@ glxCloseScreen(int index, ScreenPtr pScreen)
pGlxScreen->destroy(pGlxScreen);
- return pScreen->CloseScreen(index, pScreen);
+ return pScreen->CloseScreen(pScreen);
}
__GLXscreen *
diff --git a/xorg-server/glx/glxscreens.h b/xorg-server/glx/glxscreens.h
index d5420ee8d..172268b29 100644
--- a/xorg-server/glx/glxscreens.h
+++ b/xorg-server/glx/glxscreens.h
@@ -153,7 +153,7 @@ struct __GLXscreen {
unsigned GLXminor;
/*@} */
- Bool (*CloseScreen) (int index, ScreenPtr pScreen);
+ Bool (*CloseScreen) (ScreenPtr pScreen);
};
void __glXScreenInit(__GLXscreen * screen, ScreenPtr pScreen);