From 44fefc11b2dfe3f9e22f6a2b93dd38a0ff9a737f Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Thu, 19 Jun 2025 15:04:09 +1000 Subject: picker: non interactive during close anim --- modules/areapicker/AreaPicker.qml | 14 +++++++++++++- modules/areapicker/Picker.qml | 5 +++++ 2 files changed, 18 insertions(+), 1 deletion(-) (limited to 'modules/areapicker') diff --git a/modules/areapicker/AreaPicker.qml b/modules/areapicker/AreaPicker.qml index 547810b..100634a 100644 --- a/modules/areapicker/AreaPicker.qml +++ b/modules/areapicker/AreaPicker.qml @@ -1,3 +1,5 @@ +pragma ComponentBehavior: Bound + import "root:/widgets" import Quickshell import Quickshell.Wayland @@ -8,6 +10,7 @@ Scope { id: root property bool freeze + property bool closing Variants { model: Quickshell.screens @@ -21,13 +24,18 @@ Scope { name: "area-picker" WlrLayershell.exclusionMode: ExclusionMode.Ignore WlrLayershell.layer: WlrLayer.Overlay - WlrLayershell.keyboardFocus: WlrKeyboardFocus.Exclusive + WlrLayershell.keyboardFocus: root.closing ? WlrKeyboardFocus.None : WlrKeyboardFocus.Exclusive + mask: root.closing ? empty : null anchors.top: true anchors.bottom: true anchors.left: true anchors.right: true + Region { + id: empty + } + Picker { loader: root screen: win.modelData @@ -41,11 +49,13 @@ Scope { function open(): void { root.freeze = false; + root.closing = false; root.activeAsync = true; } function openFreeze(): void { root.freeze = true; + root.closing = false; root.activeAsync = true; } } @@ -55,6 +65,7 @@ Scope { description: "Open screenshot tool" onPressed: { root.freeze = false; + root.closing = false; root.activeAsync = true; } } @@ -64,6 +75,7 @@ Scope { description: "Open screenshot tool (freeze mode)" onPressed: { root.freeze = true; + root.closing = false; root.activeAsync = true; } } diff --git a/modules/areapicker/Picker.qml b/modules/areapicker/Picker.qml index 2125e23..3410a7b 100644 --- a/modules/areapicker/Picker.qml +++ b/modules/areapicker/Picker.qml @@ -94,6 +94,11 @@ MouseArea { SequentialAnimation { id: closeAnim + PropertyAction { + target: root.loader + property: "closing" + value: true + } ParallelAnimation { Anim { target: root -- cgit v1.2.3-freya