[vlc-devel] commit: XCB: follow mouse-events variable ( Rémi Denis-Courmont )
git version control
git at videolan.org
Thu Oct 29 22:14:54 CET 2009
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Oct 29 23:14:13 2009 +0200| [15dd4e11abccc5f2bc16c90641126441e02525e7] | committer: Rémi Denis-Courmont
XCB: follow mouse-events variable
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=15dd4e11abccc5f2bc16c90641126441e02525e7
---
modules/video_output/xcb/common.c | 10 +++++++---
modules/video_output/xcb/x11.c | 1 -
modules/video_output/xcb/xvideo.c | 1 -
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/modules/video_output/xcb/common.c b/modules/video_output/xcb/common.c
index 41ec0c3..fb81ccb 100644
--- a/modules/video_output/xcb/common.c
+++ b/modules/video_output/xcb/common.c
@@ -132,9 +132,13 @@ vout_window_t *GetWindow (vout_display_t *vd,
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);
+ if (var_CreateGetBool (vd, "mouse-events"))
+ {
+ 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 */
diff --git a/modules/video_output/xcb/x11.c b/modules/video_output/xcb/x11.c
index 2268489..135e963 100644
--- a/modules/video_output/xcb/x11.c
+++ b/modules/video_output/xcb/x11.c
@@ -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 values[] = {
/* XCB_CW_EVENT_MASK */
- XCB_EVENT_MASK_BUTTON_PRESS | XCB_EVENT_MASK_BUTTON_RELEASE |
XCB_EVENT_MASK_VISIBILITY_CHANGE,
/* XCB_CW_COLORMAP */
cmap,
diff --git a/modules/video_output/xcb/xvideo.c b/modules/video_output/xcb/xvideo.c
index 6a3a6b3..10c9ef1 100644
--- a/modules/video_output/xcb/xvideo.c
+++ b/modules/video_output/xcb/xvideo.c
@@ -447,7 +447,6 @@ static int Open (vlc_object_t *obj)
{
const uint32_t mask =
/* XCB_CW_EVENT_MASK */
- XCB_EVENT_MASK_BUTTON_PRESS | XCB_EVENT_MASK_BUTTON_RELEASE |
XCB_EVENT_MASK_VISIBILITY_CHANGE;
xcb_void_cookie_t c;
xcb_window_t window = xcb_generate_id (conn);
More information about the vlc-devel
mailing list