summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2014-06-24 13:43:53 -0400
committerCarl Worth <cworth@cworth.org>2014-07-03 18:03:11 -0700
commit3ca21195939477fa1f9b113ce4f6da36a8480321 (patch)
treeb2b8e4c47444716e52fa30dc3400699b487daa2a /include
parentad79d7e9874ea48670d040a90689a997c13a6170 (diff)
glxext: Send the Drawable's ID in the GLX_BufferSwapComplete event
While the official INTEL_swap_event specification says that the drawable field should contain the GLXDrawable, not the Drawable, the existing DRI2 code in dri2.c that translates from DRI2_BufferSwapComplete sends out GLX_BufferSwapComplete with the Drawable's ID, so existing codebases like Clutter/Cogl rely on getting the Drawable. Match DRI2's error here and stuff the event with the X Drawable, not the GLX drawable. This fixes apps seeing wrong drawables through an indirect GLX context or with DRI3, which uses the GLX_BufferSwapComplete event directly on the wire instead of translates Present in mesa. At the same time, also modify the structure for the event to make sure that clients don't make the same mistake. This is not an API or ABI break, as GLXDrawable and Drawable are both typedefs for XID. Signed-off-by: Jasper St. Pierre <jstpierre@mecheye.net> Reviewed-by: Axel Davy <axel.davy@ens.fr> Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit b4dcf87f34f68111acd9d364739938721fc692f4)
Diffstat (limited to 'include')
-rw-r--r--include/GL/glx.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/GL/glx.h b/include/GL/glx.h
index 234abc05025..78f5052b23a 100644
--- a/include/GL/glx.h
+++ b/include/GL/glx.h
@@ -518,7 +518,7 @@ typedef struct {
unsigned long serial; /* # of last request processed by server */
Bool send_event; /* true if this came from a SendEvent request */
Display *display; /* Display the event was read from */
- GLXDrawable drawable; /* drawable on which event was requested in event mask */
+ Drawable drawable; /* drawable on which event was requested in event mask */
int event_type;
int64_t ust;
int64_t msc;