diff options
Diffstat (limited to 'modules/areapicker')
| -rw-r--r-- | modules/areapicker/AreaPicker.qml | 14 | ||||
| -rw-r--r-- | modules/areapicker/Picker.qml | 5 |
2 files changed, 18 insertions, 1 deletions
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 |