Commit 8ef8a659 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

XCB-X11: auto hide mouse cursor

parent 28bcdf24
...@@ -76,6 +76,7 @@ struct vout_display_sys_t ...@@ -76,6 +76,7 @@ struct vout_display_sys_t
xcb_connection_t *conn; xcb_connection_t *conn;
vout_window_t *embed; /* VLC window (when windowed) */ vout_window_t *embed; /* VLC window (when windowed) */
xcb_cursor_t cursor; /* blank cursor */
xcb_window_t window; /* drawable X window */ xcb_window_t window; /* drawable X window */
xcb_gcontext_t gc; /* context to put images */ xcb_gcontext_t gc; /* context to put images */
bool shm; /* whether to use MIT-SHM */ bool shm; /* whether to use MIT-SHM */
...@@ -277,6 +278,8 @@ static int Open (vlc_object_t *obj) ...@@ -277,6 +278,8 @@ static int Open (vlc_object_t *obj)
} }
msg_Dbg (vd, "using X11 window %08"PRIx32, p_sys->window); msg_Dbg (vd, "using X11 window %08"PRIx32, p_sys->window);
msg_Dbg (vd, "using X11 graphic context %08"PRIx32, p_sys->gc); msg_Dbg (vd, "using X11 graphic context %08"PRIx32, p_sys->gc);
p_sys->cursor = CreateBlankCursor (p_sys->conn, scr);
p_sys->visible = false; p_sys->visible = false;
/* */ /* */
...@@ -507,12 +510,13 @@ static int Control (vout_display_t *vd, int query, va_list ap) ...@@ -507,12 +510,13 @@ static int Control (vout_display_t *vd, int query, va_list ap)
return VLC_SUCCESS; return VLC_SUCCESS;
} }
/* TODO */
#if 0
/* Hide the mouse. It will be send when /* Hide the mouse. It will be send when
* vout_display_t::info.b_hide_mouse is false */ * vout_display_t::info.b_hide_mouse is false */
VOUT_DISPLAY_HIDE_MOUSE, case VOUT_DISPLAY_HIDE_MOUSE:
#endif xcb_change_window_attributes (p_sys->conn, p_sys->embed->handle.xid,
XCB_CW_CURSOR, &(uint32_t){ p_sys->cursor });
return VLC_SUCCESS;
default: default:
msg_Err (vd, "Unknown request in XCB vout display"); msg_Err (vd, "Unknown request in XCB vout display");
return VLC_EGENERIC; return VLC_EGENERIC;
......
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