]> git.sesse.net Git - vlc/commitdiff
Qt4: make video widget not eat mouse click events
authorRémi Denis-Courmont <remi@remlab.net>
Sun, 16 Aug 2009 17:43:21 +0000 (20:43 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Sun, 16 Aug 2009 17:43:54 +0000 (20:43 +0300)
modules/gui/qt4/components/interface_widgets.cpp

index 6f2c39076c65a47b8122b3e4a0ec55482aba7a15..cb0f20fe84d178db38a5110ed692662be92e0b13 100644 (file)
@@ -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)",