[vlc-devel] commit: XCB: try to catch mouse clicks from the owner window ( Rémi Denis-Courmont )

git version control git at videolan.org
Sun Aug 16 16:48:35 CEST 2009


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Aug 16 17:47:31 2009 +0300| [02ff4f49b8fea8de7181cd5859a4fd4ec15daad3] | committer: Rémi Denis-Courmont 

XCB: try to catch mouse clicks from the owner window

This allows popup menu and fullscreen toggle to work outside of the
video rendering area.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=02ff4f49b8fea8de7181cd5859a4fd4ec15daad3
---

 modules/video_output/xcb/common.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/modules/video_output/xcb/common.c b/modules/video_output/xcb/common.c
index 180e22b..e006247 100644
--- a/modules/video_output/xcb/common.c
+++ b/modules/video_output/xcb/common.c
@@ -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);
     }




More information about the vlc-devel mailing list