summaryrefslogtreecommitdiff
path: root/modules/drawers
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-09-20 22:23:55 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-09-20 22:23:55 +1000
commite12b9ee3720ec5596cb8b0ee1bd00b94cfc7935e (patch)
tree6c9eb7a62881384610fe451b8c108a592e4fae21 /modules/drawers
parentdrawers: fix drag to open on empty ws (diff)
downloadcaelestia-shell-e12b9ee3720ec5596cb8b0ee1bd00b94cfc7935e.tar.gz
caelestia-shell-e12b9ee3720ec5596cb8b0ee1bd00b94cfc7935e.tar.bz2
caelestia-shell-e12b9ee3720ec5596cb8b0ee1bd00b94cfc7935e.zip
internal: centralise focus grabs
Except detached popouts focus grab (its meant to be exclusive to the other grab)
Diffstat (limited to 'modules/drawers')
-rw-r--r--modules/drawers/Drawers.qml6
-rw-r--r--modules/drawers/Interactions.qml4
2 files changed, 6 insertions, 4 deletions
diff --git a/modules/drawers/Drawers.qml b/modules/drawers/Drawers.qml
index 3a6c646..61644a3 100644
--- a/modules/drawers/Drawers.qml
+++ b/modules/drawers/Drawers.qml
@@ -40,7 +40,7 @@ Variants {
WlrLayershell.exclusionMode: ExclusionMode.Ignore
WlrLayershell.keyboardFocus: visibilities.launcher || visibilities.session ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None
- mask: focusGrab.active || Hypr.focusedMonitor?.activeWorkspace?.lastIpcObject.windows > 0 ? inputMask : null
+ mask: focusGrab.active || panels.popouts.isDetached || Hypr.focusedMonitor?.activeWorkspace?.lastIpcObject.windows > 0 ? inputMask : null
anchors.top: true
anchors.bottom: true
@@ -78,12 +78,14 @@ Variants {
HyprlandFocusGrab {
id: focusGrab
- active: (visibilities.launcher && Config.launcher.enabled) || (visibilities.session && Config.session.enabled) || (visibilities.sidebar && Config.sidebar.enabled)
+ active: (visibilities.launcher && Config.launcher.enabled) || (visibilities.session && Config.session.enabled) || (visibilities.sidebar && Config.sidebar.enabled) || (!Config.dashboard.showOnHover && visibilities.dashboard && Config.dashboard.enabled) || (panels.popouts.currentName.startsWith("traymenu") && panels.popouts.current?.depth > 1)
windows: [win]
onCleared: {
visibilities.launcher = false;
visibilities.session = false;
visibilities.sidebar = false;
+ visibilities.dashboard = false;
+ panels.popouts.hasCurrent = false;
}
}
diff --git a/modules/drawers/Interactions.qml b/modules/drawers/Interactions.qml
index 84714b5..56e2d6b 100644
--- a/modules/drawers/Interactions.qml
+++ b/modules/drawers/Interactions.qml
@@ -68,7 +68,7 @@ CustomMouseArea {
if (!utilitiesShortcutActive)
visibilities.utilities = false;
- if (!popouts.currentName.startsWith("traymenu") || popouts.current?.depth <= 1)
+ if (!popouts.currentName.startsWith("traymenu") || (popouts.current?.depth ?? 0) <= 1)
popouts.hasCurrent = false;
if (Config.bar.showOnHover)
@@ -199,7 +199,7 @@ CustomMouseArea {
// Show popouts on hover
if (x < bar.implicitWidth)
bar.checkPopout(y);
- else if (!popouts.currentName.startsWith("traymenu") && !inLeftPanel(panels.popouts, x, y))
+ else if ((!popouts.currentName.startsWith("traymenu") || (popouts.current?.depth ?? 0) <= 1) && !inLeftPanel(panels.popouts, x, y))
popouts.hasCurrent = false;
}