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

Pierre Lamot git at videolan.org
Tue Nov 7 19:18:58 CET 2017


vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Tue Nov  7 15:41:02 2017 +0100| [53d410c3bc10429ede78e826d3c46564446e7f3a] | committer: Jean-Baptiste Kempf

vout: on windows context menu should apear on mouse release

Yes, Windows does it the wrong way... What can we do?

Close #19025

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 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)
 {



More information about the vlc-commits mailing list