glx: Make __glXGetDrawableAttribute return true sometimes
authorAdam Jackson <ajax@redhat.com>
Tue, 20 Aug 2019 19:47:22 +0000 (15:47 -0400)
committerAdam Jackson <ajax@redhat.com>
Thu, 22 Aug 2019 17:29:06 +0000 (13:29 -0400)
Right now it always returns zero, but as of:

    commit a48a6b8a400e6e92961cf7b7b4c287e8e9875f39
    Author: Adam Jackson <ajax@redhat.com>
    Date:   Tue Nov 14 15:13:05 2017 -0500

        glx: Prepare driFetchDrawable for no-config contexts

We were hoping it would return true if the drawable could actually be
looked up. It wasn't, so that didn't go very well. With the most recent
update to <GL/glxext.h> glXQueryGLXPbufferSGIX (correctly) returns void,
so there's no longer anything else besides driFetchDrawable that depends
on the return value from __glXGetDrawableAttribute.

Acked-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/glx/glx_pbuffer.c

index 6bdb6354f4559149ca2249584848e3040e9b2edb..515099aa0d8767121fb5e7ceda383274d885a2be 100644 (file)
@@ -414,7 +414,7 @@ __glXGetDrawableAttribute(Display * dpy, GLXDrawable drawable,
    UnlockDisplay(dpy);
    SyncHandle();
 
-   return 0;
+   return 1;
 }
 
 static void