XCB: trigger the pop-up menu
authorRémi Denis-Courmont <rdenis@simphalempin.com>
Thu, 29 Jan 2009 18:22:31 +0000 (20:22 +0200)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Thu, 29 Jan 2009 18:22:31 +0000 (20:22 +0200)
IMHO, this should really be a vout variable though - how is the UI
supposed to know which video output is triggering otherwise?

modules/video_output/xcb/events.c

index 89c6273..0f09885 100644 (file)
@@ -53,8 +53,16 @@ static void HandleButtonRelease (vout_thread_t *vout,
     buttons &= ~(1 << (ev->detail - 1));
     var_SetInteger (vout, "mouse-button-down", buttons);
 
     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,
 }
 
 static void HandleMotionNotify (vout_thread_t *vout,