]> git.sesse.net Git - vlc/commitdiff
XCB: try to catch mouse clicks from the owner window
authorRémi Denis-Courmont <remi@remlab.net>
Sun, 16 Aug 2009 14:47:31 +0000 (17:47 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Sun, 16 Aug 2009 14:48:30 +0000 (17:48 +0300)
This allows popup menu and fullscreen toggle to work outside of the
video rendering area.

modules/video_output/xcb/common.c

index 180e22b71f59c73f8002494fda808a81780b69c5..e006247088d0244401a4016470d2c798b056e400 100644 (file)
@@ -114,7 +114,12 @@ vout_window_t *GetWindow (vout_display_t *vd,
         free (geo);
 
         /* Subscribe to parent window resize events */
-        const uint32_t value = XCB_EVENT_MASK_STRUCTURE_NOTIFY;
+        uint32_t value = XCB_EVENT_MASK_STRUCTURE_NOTIFY;
+        xcb_change_window_attributes (conn, wnd->handle.xid,
+                                      XCB_CW_EVENT_MASK, &value);
+        /* Try to subscribe to click events */
+        /* (only one X11 client can get them, so might not work) */
+        value |= XCB_EVENT_MASK_BUTTON_PRESS | XCB_EVENT_MASK_BUTTON_RELEASE;
         xcb_change_window_attributes (conn, wnd->handle.xid,
                                       XCB_CW_EVENT_MASK, &value);
     }