[PATCH 2/5] glx: Implement GLX_{WIDTH, HEIGHT} in GetDrawableAttributes

Adam Jackson ajax at redhat.com
Mon Feb 25 14:04:09 PST 2013


Required by GLX 1.4, section 3.3.6, "Querying Attributes".

Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 glx/glxcmds.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index 09fc719..53c5eaa 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -1874,7 +1874,7 @@ DoGetDrawableAttributes(__GLXclientState * cl, XID drawId)
     ClientPtr client = cl->client;
     xGLXGetDrawableAttributesReply reply;
     __GLXdrawable *pGlxDraw;
-    CARD32 attributes[6];
+    CARD32 attributes[10];
     int numAttribs = 0, error;
 
     if (!validGlxDrawable(client, drawId, GLX_DRAWABLE_ANY,
@@ -1891,6 +1891,12 @@ DoGetDrawableAttributes(__GLXclientState * cl, XID drawId)
     attributes[4] = GLX_EVENT_MASK;
     attributes[5] = pGlxDraw->eventMask;
     numAttribs++;
+    attributes[6] = GLX_WIDTH;
+    attributes[7] = pGlxDraw->pDraw->width;
+    numAttribs++;
+    attributes[8] = GLX_HEIGHT;
+    attributes[9] = pGlxDraw->pDraw->height;
+    numAttribs++;
 
     reply = (xGLXGetDrawableAttributesReply) {
         .type = X_Reply,
-- 
1.8.1.4



More information about the xorg-devel mailing list