[vlc-devel] commit: XCB: trigger the pop-up menu ( Rémi Denis-Courmont )

git version control git at videolan.org
Thu Jan 29 19:23:23 CET 2009


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Thu Jan 29 20:22:31 2009 +0200| [1fce4b4d597e1a93baceb4cd0853275f089b1afe] | committer: Rémi Denis-Courmont 

XCB: trigger the pop-up menu

IMHO, this should really be a vout variable though - how is the UI
supposed to know which video output is triggering otherwise?

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

 modules/video_output/xcb/events.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/modules/video_output/xcb/events.c b/modules/video_output/xcb/events.c
index 89c6273..0f09885 100644
--- a/modules/video_output/xcb/events.c
+++ b/modules/video_output/xcb/events.c
@@ -53,8 +53,16 @@ static void HandleButtonRelease (vout_thread_t *vout,
     buttons &= ~(1 << (ev->detail - 1));
     var_SetInteger (vout, "mouse-button-down", buttons);
 
-    if (ev->detail == 1) /* left mouse button */
-        var_SetBool (vout, "mouse-clicked", true);
+    switch (ev->detail)
+    {
+        case 1: /* left mouse button */
+            var_SetBool (vout, "mouse-clicked", true);
+            var_SetBool (vout->p_libvlc, "intf-popupmenu", false);
+            break;
+        case 3:
+            var_SetBool (vout->p_libvlc, "intf-popupmenu", true);
+            break;
+    }
 }
 
 static void HandleMotionNotify (vout_thread_t *vout,




More information about the vlc-devel mailing list