Commit 5e66bde2 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

XCB: flush when changing the cursor

This should fix cursor (un)hiding with some OpenGL back-ends
parent bee6b903
......@@ -135,6 +135,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);
......
......@@ -553,10 +553,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:
{
......
......@@ -535,6 +535,7 @@ static int Control (vout_display_t *vd, int query, va_list ap)
case VOUT_DISPLAY_HIDE_MOUSE:
xcb_change_window_attributes (sys->conn, sys->embed->handle.xid,
XCB_CW_CURSOR, &(uint32_t){ sys->cursor });
xcb_flush (sys->conn);
return VLC_SUCCESS;
default:
......
......@@ -797,6 +797,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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment