Added few more stubs so that control reaches to DestroyDevice().
[mesa.git] / src / glx / glx_pbuffer.c
index 24c073cb9baa72ea35f9e696f1d2c794408e9ac7..b654168324c309540cb4edce89d089f57aa58236 100644 (file)
@@ -86,10 +86,10 @@ ChangeDrawableAttribute(Display * dpy, GLXDrawable drawable,
    struct glx_display *priv = __glXInitialize(dpy);
 #ifdef GLX_DIRECT_RENDERING
    __GLXDRIdrawable *pdraw;
+   int i;
 #endif
    CARD32 *output;
    CARD8 opcode;
-   int i;
 
    if ((priv == NULL) || (dpy == NULL) || (drawable == 0)) {
       return;
@@ -272,9 +272,9 @@ DestroyDRIDrawable(Display *dpy, GLXDrawable drawable, int destroy_xdrawable)
  * 10.  Given that, this routine should try to use an array on the stack to
  * capture the reply rather than always calling Xmalloc.
  */
-static int
-GetDrawableAttribute(Display * dpy, GLXDrawable drawable,
-                     int attribute, unsigned int *value)
+int
+__glXGetDrawableAttribute(Display * dpy, GLXDrawable drawable,
+                          int attribute, unsigned int *value)
 {
    struct glx_display *priv;
    xGLXGetDrawableAttributesReply reply;
@@ -414,7 +414,7 @@ GetDrawableAttribute(Display * dpy, GLXDrawable drawable,
    UnlockDisplay(dpy);
    SyncHandle();
 
-   return 0;
+   return 1;
 }
 
 static void
@@ -825,7 +825,7 @@ glXQueryDrawable(Display * dpy, GLXDrawable drawable,
       }
    }
 #else
-   GetDrawableAttribute(dpy, drawable, attribute, value);
+   __glXGetDrawableAttribute(dpy, drawable, attribute, value);
 #endif
 }
 
@@ -834,11 +834,11 @@ glXQueryDrawable(Display * dpy, GLXDrawable drawable,
 /**
  * Query an attribute of a pbuffer.
  */
-_GLX_PUBLIC int
+_GLX_PUBLIC void
 glXQueryGLXPbufferSGIX(Display * dpy, GLXPbufferSGIX drawable,
                        int attribute, unsigned int *value)
 {
-   return GetDrawableAttribute(dpy, drawable, attribute, value);
+   __glXGetDrawableAttribute(dpy, drawable, attribute, value);
 }
 #endif
 
@@ -901,7 +901,7 @@ glXGetSelectedEvent(Display * dpy, GLXDrawable drawable, unsigned long *mask)
    __glXSendError(dpy, GLXBadDrawable, drawable, X_GLXGetDrawableAttributes,
                   true);
 #else
-   unsigned int value;
+   unsigned int value = 0;
 
 
    /* The non-sense with value is required because on LP64 platforms
@@ -909,7 +909,7 @@ glXGetSelectedEvent(Display * dpy, GLXDrawable drawable, unsigned long *mask)
     * we could just type-cast the pointer, but why?
     */
 
-   GetDrawableAttribute(dpy, drawable, GLX_EVENT_MASK_SGIX, &value);
+   __glXGetDrawableAttribute(dpy, drawable, GLX_EVENT_MASK_SGIX, &value);
    *mask = value;
 #endif
 }
@@ -992,7 +992,6 @@ glXDestroyWindow(Display * dpy, GLXWindow win)
 #endif
 }
 
-#ifndef GLX_USE_APPLEGL
 _GLX_PUBLIC
 GLX_ALIAS_VOID(glXDestroyGLXPbufferSGIX,
                (Display * dpy, GLXPbufferSGIX pbuf),
@@ -1008,4 +1007,3 @@ GLX_ALIAS_VOID(glXGetSelectedEventSGIX,
                (Display * dpy, GLXDrawable drawable,
                 unsigned long *mask), (dpy, drawable, mask),
                glXGetSelectedEvent)
-#endif