[vlc-devel] [PATCH] vout: on windows context menu should apear on mouse release

Pierre Lamot pierre at videolabs.io
Tue Nov 7 15:41:02 CET 2017


  fix: #19025
---
 src/video_output/event.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/video_output/event.h b/src/video_output/event.h
index 78804c190c..ac40ef3405 100644
--- a/src/video_output/event.h
+++ b/src/video_output/event.h
@@ -80,7 +80,9 @@ static inline void vout_SendEventMousePressed(vout_thread_t *vout, int button)
         var_ToggleBool(vout->obj.libvlc, "intf-toggle-fscontrol");
         return;
     case MOUSE_BUTTON_RIGHT:
+#if !defined(_WIN32)
         var_SetBool(vout->obj.libvlc, "intf-popupmenu", true);
+#endif
         return;
     case MOUSE_BUTTON_WHEEL_UP:    key = KEY_MOUSEWHEELUP;    break;
     case MOUSE_BUTTON_WHEEL_DOWN:  key = KEY_MOUSEWHEELDOWN;  break;
@@ -92,6 +94,14 @@ static inline void vout_SendEventMousePressed(vout_thread_t *vout, int button)
 static inline void vout_SendEventMouseReleased(vout_thread_t *vout, int button)
 {
     var_NAndInteger(vout, "mouse-button-down", 1 << button);
+#if defined(_WIN32)
+    switch (button)
+    {
+    case MOUSE_BUTTON_RIGHT:
+        var_SetBool(vout->obj.libvlc, "intf-popupmenu", true);
+        return;
+    }
+#endif
 }
 static inline void vout_SendEventMouseDoubleClick(vout_thread_t *vout)
 {
-- 
2.14.2



More information about the vlc-devel mailing list