Commit 942d827e 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
(cherry picked from commit 5e66bde2b006d572db85b7ffec3ba589f2bc933e)

Conflicts:

	modules/video_output/xcb/x11.c
parent 5e38b976
......@@ -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);
......
......@@ -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:
{
......
......@@ -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:
......
......@@ -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);
......
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