diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-05-19 23:05:21 +0800 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-05-19 23:05:21 +0800 |
| commit | d114f4c0bf6cdd7b5dadd859f2c2d00f3ecd63d3 (patch) | |
| tree | 1bd881832707b0f4f27f71f91a064a77bc04f5f5 | |
| parent | dashboard: resources (diff) | |
| download | caelestia-shell-d114f4c0bf6cdd7b5dadd859f2c2d00f3ecd63d3.tar.gz caelestia-shell-d114f4c0bf6cdd7b5dadd859f2c2d00f3ecd63d3.tar.bz2 caelestia-shell-d114f4c0bf6cdd7b5dadd859f2c2d00f3ecd63d3.zip | |
feat: close launcher and session on click out
Using focus grab
| -rw-r--r-- | modules/drawers/Drawers.qml | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/modules/drawers/Drawers.qml b/modules/drawers/Drawers.qml index 91c6fc8..184d464 100644 --- a/modules/drawers/Drawers.qml +++ b/modules/drawers/Drawers.qml @@ -5,6 +5,7 @@ import "root:/services" import "root:/config" import Quickshell import Quickshell.Wayland +import Quickshell.Hyprland import QtQuick Variants { @@ -25,7 +26,7 @@ Variants { screen: scope.modelData name: "drawers" exclusionMode: ExclusionMode.Ignore - keyboardFocus: visibilities.launcher || visibilities.session ? WlrKeyboardFocus.Exclusive : WlrKeyboardFocus.None + keyboardFocus: visibilities.launcher || visibilities.session ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None mask: Region { x: BorderConfig.thickness @@ -55,6 +56,15 @@ Variants { } } + HyprlandFocusGrab { + active: visibilities.launcher || visibilities.session + windows: [win] + onCleared: { + visibilities.launcher = false; + visibilities.session = false; + } + } + StyledRect { anchors.fill: parent opacity: visibilities.session ? 0.5 : 0 |