From e12b9ee3720ec5596cb8b0ee1bd00b94cfc7935e Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Sat, 20 Sep 2025 22:23:55 +1000 Subject: internal: centralise focus grabs Except detached popouts focus grab (its meant to be exclusive to the other grab) --- modules/drawers/Drawers.qml | 6 ++++-- modules/drawers/Interactions.qml | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'modules/drawers') 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; } -- cgit v1.2.3-freya