From e030fb12820764fa2e6037703c83cca49e276ba5 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sun, 25 May 2025 22:16:23 +0200 Subject: [PATCH] drag manager: don't hog input when not interactive --- .../modules/common/widgets/DragManager.qml | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.config/quickshell/modules/common/widgets/DragManager.qml b/.config/quickshell/modules/common/widgets/DragManager.qml index 2e59034de..109f18254 100644 --- a/.config/quickshell/modules/common/widgets/DragManager.qml +++ b/.config/quickshell/modules/common/widgets/DragManager.qml @@ -29,14 +29,20 @@ MouseArea { // Flick to dismiss } onPressed: (mouse) => { - if (!root.interactive) return; + if (!root.interactive) { + mouse.accepted = false; + return; + } if (mouse.button === Qt.LeftButton) { startX = mouse.x startY = mouse.y } } onReleased: (mouse) => { - if (!root.interactive) return; + if (!root.interactive) { + mouse.accepted = false; + return; + } dragging = false root.dragReleased(_dragDiffX, _dragDiffY); if (root.automaticallyReset) { @@ -44,7 +50,10 @@ MouseArea { // Flick to dismiss } } onPositionChanged: (mouse) => { - if (!root.interactive) return; + if (!root.interactive) { + mouse.accepted = false; + return; + } if (mouse.buttons & Qt.LeftButton) { root._dragDiffX = mouse.x - startX root._dragDiffY = mouse.y - startY @@ -54,7 +63,10 @@ MouseArea { // Flick to dismiss } } onCanceled: (mouse) => { - if (!root.interactive) return; + if (!root.interactive) { + mouse.accepted = false; + return; + } released(mouse); } }