[vlc-commits] XCB: flush when changing the cursor

Rémi Denis-Courmont git at videolan.org
Sun May 29 19:22:54 CEST 2011


vlc/vlc-1.1 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun May 29 20:21:01 2011 +0300| [942d827e3881474bb3e88eb0241a131290cda54d] | committer: Rémi Denis-Courmont

XCB: flush when changing the cursor

This should fix cursor (un)hiding with some OpenGL back-ends
(cherry picked from commit 5e66bde2b006d572db85b7ffec3ba589f2bc933e)

Conflicts:

	modules/video_output/xcb/x11.c

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=942d827e3881474bb3e88eb0241a131290cda54d
---

 modules/video_output/xcb/events.c |    1 +
 modules/video_output/xcb/glx.c    |    8 ++++++--
 modules/video_output/xcb/x11.c    |    1 +
 modules/video_output/xcb/xvideo.c |    1 +
 4 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/modules/video_output/xcb/events.c b/modules/video_output/xcb/events.c
index 1dce547..fc5db03 100644
--- a/modules/video_output/xcb/events.c
+++ b/modules/video_output/xcb/events.c
@@ -136,6 +136,7 @@ static void HandleMotionNotify (vout_display_t *vd, xcb_connection_t *conn,
     /* show the default cursor */
     xcb_change_window_attributes (conn, ev->event, XCB_CW_CURSOR,
                                   &(uint32_t) { XCB_CURSOR_NONE });
+    xcb_flush (conn);
 
     /* TODO it could be saved */
     vout_display_PlacePicture (&place, &vd->source, vd->cfg, false);
diff --git a/modules/video_output/xcb/glx.c b/modules/video_output/xcb/glx.c
index 46f8a90..e396c0f 100644
--- a/modules/video_output/xcb/glx.c
+++ b/modules/video_output/xcb/glx.c
@@ -546,10 +546,14 @@ static int Control (vout_display_t *vd, int query, va_list ap)
     /* Hide the mouse. It will be send when
      * vout_display_t::info.b_hide_mouse is false */
     case VOUT_DISPLAY_HIDE_MOUSE:
-        xcb_change_window_attributes (XGetXCBConnection (sys->display),
-                                      sys->embed->handle.xid,
+    {
+        xcb_connection_t *conn = XGetXCBConnection (sys->display);
+
+        xcb_change_window_attributes (conn, sys->embed->handle.xid,
                                     XCB_CW_CURSOR, &(uint32_t){ sys->cursor });
+        xcb_flush (conn);
         return VLC_SUCCESS;
+    }
 
     case VOUT_DISPLAY_GET_OPENGL:
     {
diff --git a/modules/video_output/xcb/x11.c b/modules/video_output/xcb/x11.c
index 8ec9232..6ccf7eb 100644
--- a/modules/video_output/xcb/x11.c
+++ b/modules/video_output/xcb/x11.c
@@ -547,6 +547,7 @@ static int Control (vout_display_t *vd, int query, va_list ap)
     case VOUT_DISPLAY_HIDE_MOUSE:
         xcb_change_window_attributes (p_sys->conn, p_sys->embed->handle.xid,
                                   XCB_CW_CURSOR, &(uint32_t){ p_sys->cursor });
+        xcb_flush (p_sys->conn);
         return VLC_SUCCESS;
 
     default:
diff --git a/modules/video_output/xcb/xvideo.c b/modules/video_output/xcb/xvideo.c
index 5582427..356f3c5 100644
--- a/modules/video_output/xcb/xvideo.c
+++ b/modules/video_output/xcb/xvideo.c
@@ -780,6 +780,7 @@ static int Control (vout_display_t *vd, int query, va_list ap)
     case VOUT_DISPLAY_HIDE_MOUSE:
         xcb_change_window_attributes (p_sys->conn, p_sys->embed->handle.xid,
                                   XCB_CW_CURSOR, &(uint32_t){ p_sys->cursor });
+        xcb_flush (p_sys->conn);
         return VLC_SUCCESS;
     case VOUT_DISPLAY_RESET_PICTURES:
         assert(0);



More information about the vlc-commits mailing list