From 6926880074dab7bf63b92e4c2a6d5bdc66e8577b Mon Sep 17 00:00:00 2001 From: zach Date: Sun, 31 May 2026 23:05:31 +0200 Subject: [PATCH] remove multi-touch handlers, single point for sidebar --- Drawers/Interactions.qml | 37 ++++++------------------------------- 1 file changed, 6 insertions(+), 31 deletions(-) diff --git a/Drawers/Interactions.qml b/Drawers/Interactions.qml index 2fc2861..f99f3df 100644 --- a/Drawers/Interactions.qml +++ b/Drawers/Interactions.qml @@ -12,7 +12,6 @@ Item { property bool dashboardShortcutActive required property Drawing drawing required property DrawingInput input - property bool multiGestureTriggered: false property bool osdShortcutActive required property Panels panels required property BarPopouts.Wrapper popouts @@ -55,35 +54,6 @@ Item { anchors.fill: parent - DragHandler { - id: multiHandler - - dragThreshold: 0 - grabPermissions: PointerHandler.CanTakeOverFromHandlersOfDifferentType | PointerHandler.ApprovesTakeOverByAnything - maximumPointCount: 2 - minimumPointCount: 2 - target: null - - onActiveChanged: { - if (!active) - root.multiGestureTriggered = false; - } - onCentroidChanged: { - if (root.multiGestureTriggered) - return; - - const x = centroid.position.x; - const y = centroid.position.y; - const dragX = x - centroid.pressPosition.x; - const dragY = y - centroid.pressPosition.y; - - if (centroid.pressPosition.x > root.screen.width - Config.barConfig.border && dragX < -20) { - root.visibilities.sidebar = true; - root.multiGestureTriggered = true; - } - } - } - DragHandler { id: singleHandler @@ -123,7 +93,12 @@ Item { root.singleGestureTriggered = true; } - if (centroid.pressPosition.x >= root.screen.width - Config.barConfig.border && dragX < -20) { + if (centroid.pressPosition.x > root.screen.width - Config.barConfig.border && centroid.pressPosition.y < (root.screen.height / 2) && dragX < -20) { + root.visibilities.sidebar = true; + root.singleGestureTriggered = true; + } + + if (centroid.pressPosition.x >= root.screen.width - Config.barConfig.border && centroid.pressPosition.y > (root.screen.height / 2) && dragX < -20) { Hypr.dispatch(`hl.dsp.focus({ workspace = 'r+1', on_current_monitor = true })`); root.singleGestureTriggered = true; }