From bd057d1bbcde511df0a1fc2c3128ab252ff20095 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Sun, 16 Aug 2009 20:43:21 +0300 Subject: [PATCH] Qt4: make video widget not eat mouse click events --- modules/gui/qt4/components/interface_widgets.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/modules/gui/qt4/components/interface_widgets.cpp b/modules/gui/qt4/components/interface_widgets.cpp index 6f2c39076c..cb0f20fe84 100644 --- a/modules/gui/qt4/components/interface_widgets.cpp +++ b/modules/gui/qt4/components/interface_widgets.cpp @@ -150,6 +150,17 @@ WId VideoWidget::request( int *pi_x, int *pi_y, reparentable->setLayout( innerLayout ); layout->addWidget( reparentable ); +#ifdef Q_WS_X11 + /* HACK: Only one X11 client can subscribe to mouse click events. + * VLC currently handles those in the video display. + * Force Qt4 to unsubscribe from them. */ + Display *dpy = QX11Info::display(); + Window w = stable->winId(); + XWindowAttributes attr; + + XGetWindowAttributes( dpy, w, &attr ); + XSelectInput( dpy, w, attr.your_event_mask & ~ButtonPressMask ); +#endif videoSync(); #ifndef NDEBUG msg_Dbg( p_intf, "embedded video ready (handle %p)", -- 2.39.5