[vlc-devel] [PATCH 02/16] qml: fix playlist right click drag prevention

Fatih Uzunoglu fuzun54 at outlook.com
Wed Jul 29 23:04:25 CEST 2020


---
 modules/gui/qt/playlist/qml/PLItem.qml | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/modules/gui/qt/playlist/qml/PLItem.qml b/modules/gui/qt/playlist/qml/PLItem.qml
index d4e4ac0ad2..56974e05be 100644
--- a/modules/gui/qt/playlist/qml/PLItem.qml
+++ b/modules/gui/qt/playlist/qml/PLItem.qml
@@ -84,10 +84,12 @@ Rectangle {
 
         drag.target: dragItem
 
+        property bool __rightButton : false
+
         Connections {
             target: mouse.drag
             onActiveChanged: {
-                if (mouse.button === Qt.RightButton)
+                if (mouse.__rightButton)
                     return
                 if (target.active) {
                     root.dragStarting()
@@ -103,7 +105,13 @@ Rectangle {
 
         onPressed:  {
             if (mouse.button === Qt.RightButton)
+            {
+                __rightButton = true
                 return
+            }
+            else
+                __rightButton = false
+
             var pos = this.mapToGlobal( mouseX, mouseY)
             dragItem.updatePos(pos.x, pos.y)
         }
-- 
2.25.1



More information about the vlc-devel mailing list