diff mbox

[13/18] dri3: Flush XCB before blocking for special events

Message ID 1386984330-26074-14-git-send-email-keithp@keithp.com
State New, archived
Headers show

Commit Message

Keith Packard Dec. 14, 2013, 1:25 a.m. UTC
XCB doesn't flush the output buffer automatically, so we have to call
xcb_flush ourselves before waiting.

Signed-off-by: Keith Packard <keithp@keithp.com>
---
 src/glx/dri3_glx.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox

Patch

diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c
index c26d6e5..7982f6b 100644
--- a/src/glx/dri3_glx.c
+++ b/src/glx/dri3_glx.c
@@ -405,6 +405,7 @@  dri3_wait_for_event(__GLXDRIdrawable *pdraw)
    xcb_generic_event_t *ev;
    xcb_present_generic_event_t *ge;
 
+   xcb_flush(c);
    ev = xcb_wait_for_special_event(c, priv->special_event);
    if (!ev)
       return false;
@@ -1074,6 +1075,7 @@  dri3_find_back(xcb_connection_t *c, struct dri3_drawable *priv)
          if (!buffer->busy)
             return b;
       }
+      xcb_flush(c);
       ev = xcb_wait_for_special_event(c, priv->special_event);
       if (!ev)
          return -1;