Commit 15dd4e11 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

XCB: follow mouse-events variable

parent 53231d2c
...@@ -132,9 +132,13 @@ vout_window_t *GetWindow (vout_display_t *vd, ...@@ -132,9 +132,13 @@ vout_window_t *GetWindow (vout_display_t *vd,
XCB_CW_EVENT_MASK, &value); XCB_CW_EVENT_MASK, &value);
/* Try to subscribe to click events */ /* Try to subscribe to click events */
/* (only one X11 client can get them, so might not work) */ /* (only one X11 client can get them, so might not work) */
value |= XCB_EVENT_MASK_BUTTON_PRESS | XCB_EVENT_MASK_BUTTON_RELEASE; if (var_CreateGetBool (vd, "mouse-events"))
xcb_change_window_attributes (conn, wnd->handle.xid, {
XCB_CW_EVENT_MASK, &value); value |= XCB_EVENT_MASK_BUTTON_PRESS
| XCB_EVENT_MASK_BUTTON_RELEASE;
xcb_change_window_attributes (conn, wnd->handle.xid,
XCB_CW_EVENT_MASK, &value);
}
} }
/* Find the selected screen */ /* Find the selected screen */
......
...@@ -257,7 +257,6 @@ static int Open (vlc_object_t *obj) ...@@ -257,7 +257,6 @@ static int Open (vlc_object_t *obj)
const uint32_t mask = XCB_CW_EVENT_MASK | XCB_CW_COLORMAP; const uint32_t mask = XCB_CW_EVENT_MASK | XCB_CW_COLORMAP;
const uint32_t values[] = { const uint32_t values[] = {
/* XCB_CW_EVENT_MASK */ /* XCB_CW_EVENT_MASK */
XCB_EVENT_MASK_BUTTON_PRESS | XCB_EVENT_MASK_BUTTON_RELEASE |
XCB_EVENT_MASK_VISIBILITY_CHANGE, XCB_EVENT_MASK_VISIBILITY_CHANGE,
/* XCB_CW_COLORMAP */ /* XCB_CW_COLORMAP */
cmap, cmap,
......
...@@ -447,7 +447,6 @@ static int Open (vlc_object_t *obj) ...@@ -447,7 +447,6 @@ static int Open (vlc_object_t *obj)
{ {
const uint32_t mask = const uint32_t mask =
/* XCB_CW_EVENT_MASK */ /* XCB_CW_EVENT_MASK */
XCB_EVENT_MASK_BUTTON_PRESS | XCB_EVENT_MASK_BUTTON_RELEASE |
XCB_EVENT_MASK_VISIBILITY_CHANGE; XCB_EVENT_MASK_VISIBILITY_CHANGE;
xcb_void_cookie_t c; xcb_void_cookie_t c;
xcb_window_t window = xcb_generate_id (conn); xcb_window_t window = xcb_generate_id (conn);
......
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