aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/glx/glxscreens.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/glx/glxscreens.c')
-rw-r--r--xorg-server/glx/glxscreens.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/xorg-server/glx/glxscreens.c b/xorg-server/glx/glxscreens.c
index 4bd2eed5e..e3993bded 100644
--- a/xorg-server/glx/glxscreens.c
+++ b/xorg-server/glx/glxscreens.c
@@ -44,8 +44,8 @@
#include "glxext.h"
#include "protocol-versions.h"
-static int glxScreenPrivateKeyIndex;
-static DevPrivateKey glxScreenPrivateKey = &glxScreenPrivateKeyIndex;
+static DevPrivateKeyRec glxScreenPrivateKeyRec;
+#define glxScreenPrivateKey (&glxScreenPrivateKeyRec)
const char GLServerVersion[] = "1.4";
static const char GLServerExtensions[] =
@@ -352,6 +352,9 @@ void __glXScreenInit(__GLXscreen *pGlxScreen, ScreenPtr pScreen)
__GLXconfig *config;
int i;
+ if (!dixRegisterPrivateKey(&glxScreenPrivateKeyRec, PRIVATE_SCREEN, 0))
+ return;
+
pGlxScreen->pScreen = pScreen;
pGlxScreen->GLextensions = xstrdup(GLServerExtensions);
pGlxScreen->GLXvendor = xstrdup(GLXServerVendorName);