glx: Use _X_EXPORT instead of our own PUBLIC macro
[mesa.git] / src / glx / dri2.c
index d53431c19a64b2305a8836654feeaf1f28c500a7..f288ab8183557693d7ec4c12fd2371ecef2a8b6f 100644 (file)
@@ -88,7 +88,6 @@ static Bool
 DRI2WireToEvent(Display *dpy, XEvent *event, xEvent *wire)
 {
    XExtDisplayInfo *info = DRI2FindDisplay(dpy);
-   __GLXdisplayPrivate *glx_dpy = __glXInitialize(dpy);
 
    XextCheckExtension(dpy, info, dri2ExtensionName, False);
 
@@ -100,6 +99,7 @@ DRI2WireToEvent(Display *dpy, XEvent *event, xEvent *wire)
       GLXBufferSwapComplete *aevent = (GLXBufferSwapComplete *)event;
       xDRI2BufferSwapComplete *awire = (xDRI2BufferSwapComplete *)wire;
       __GLXDRIdrawable *pdraw;
+      __GLXdisplayPrivate *glx_dpy = __glXInitialize(dpy);
 
       /* Ignore swap events if we're not looking for them */
       pdraw = dri2GetGlxDrawableFromXDrawableId(dpy, awire->drawable);