From 31e821250f9084192e4218e9ac7f71477664fe91 Mon Sep 17 00:00:00 2001 From: altrup <51763643+altrup@users.noreply.github.com> Date: Fri, 2 Jan 2026 16:04:01 -0500 Subject: [PATCH 1/5] Force focus workaround --- .../.config/quickshell/ii/services/GlobalFocusGrab.qml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dots/.config/quickshell/ii/services/GlobalFocusGrab.qml b/dots/.config/quickshell/ii/services/GlobalFocusGrab.qml index 547d79e17..5fa3d2606 100644 --- a/dots/.config/quickshell/ii/services/GlobalFocusGrab.qml +++ b/dots/.config/quickshell/ii/services/GlobalFocusGrab.qml @@ -52,9 +52,17 @@ Singleton { } } + function hasActive(element) { + return element.activeFocus || Array.from( + element.children + ).some( + (child) => hasActive(child) + ); + } + HyprlandFocusGrab { id: grab - windows: [...root.persistent, ...root.dismissable] + windows: root.dismissable.some(w => hasActive(w.contentItem)) ? [...root.dismissable, ...root.persistent] : [...root.dismissable] active: root.dismissable.length > 0 onCleared: () => { root.dismiss(); From 5b27dfa7470dc50dba038a92bf642644e1309e40 Mon Sep 17 00:00:00 2001 From: altrup <51763643+altrup@users.noreply.github.com> Date: Fri, 9 Jan 2026 13:54:44 -0500 Subject: [PATCH 2/5] Uncomment WlrLayerShell.keyboardFocus in Overview --- dots/.config/quickshell/ii/modules/ii/overview/Overview.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dots/.config/quickshell/ii/modules/ii/overview/Overview.qml b/dots/.config/quickshell/ii/modules/ii/overview/Overview.qml index d94404721..fe3df64a3 100644 --- a/dots/.config/quickshell/ii/modules/ii/overview/Overview.qml +++ b/dots/.config/quickshell/ii/modules/ii/overview/Overview.qml @@ -24,7 +24,7 @@ Scope { WlrLayershell.namespace: "quickshell:overview" WlrLayershell.layer: WlrLayer.Top - // WlrLayershell.keyboardFocus: GlobalStates.overviewOpen ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None + WlrLayershell.keyboardFocus: GlobalStates.overviewOpen ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None color: "transparent" mask: Region { From cf2e944742a1a2f8109105af82d91f5246671284 Mon Sep 17 00:00:00 2001 From: altrup <51763643+altrup@users.noreply.github.com> Date: Sat, 10 Jan 2026 14:09:22 -0500 Subject: [PATCH 3/5] Add WlrKeyboardFocus.OnDemand to sidebar right when open --- .../quickshell/ii/modules/ii/sidebarRight/SidebarRight.qml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dots/.config/quickshell/ii/modules/ii/sidebarRight/SidebarRight.qml b/dots/.config/quickshell/ii/modules/ii/sidebarRight/SidebarRight.qml index 62946cb61..e7da61e44 100644 --- a/dots/.config/quickshell/ii/modules/ii/sidebarRight/SidebarRight.qml +++ b/dots/.config/quickshell/ii/modules/ii/sidebarRight/SidebarRight.qml @@ -22,8 +22,7 @@ Scope { exclusiveZone: 0 implicitWidth: sidebarWidth WlrLayershell.namespace: "quickshell:sidebarRight" - // Hyprland 0.49: Focus is always exclusive and setting this breaks mouse focus grab - // WlrLayershell.keyboardFocus: WlrKeyboardFocus.Exclusive + WlrLayershell.keyboardFocus: GlobalStates.sidebarRightOpen ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None color: "transparent" anchors { From 94490f371b662a073977528b5720b50af06b891f Mon Sep 17 00:00:00 2001 From: altrup <51763643+altrup@users.noreply.github.com> Date: Mon, 12 Jan 2026 14:00:41 -0500 Subject: [PATCH 4/5] Fix case with unfocusable dismissables --- dots/.config/quickshell/ii/services/GlobalFocusGrab.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dots/.config/quickshell/ii/services/GlobalFocusGrab.qml b/dots/.config/quickshell/ii/services/GlobalFocusGrab.qml index 5fa3d2606..6385d3df7 100644 --- a/dots/.config/quickshell/ii/services/GlobalFocusGrab.qml +++ b/dots/.config/quickshell/ii/services/GlobalFocusGrab.qml @@ -53,8 +53,8 @@ Singleton { } function hasActive(element) { - return element.activeFocus || Array.from( - element.children + return element?.activeFocus || Array.from( + element?.children ).some( (child) => hasActive(child) ); @@ -62,7 +62,7 @@ Singleton { HyprlandFocusGrab { id: grab - windows: root.dismissable.some(w => hasActive(w.contentItem)) ? [...root.dismissable, ...root.persistent] : [...root.dismissable] + windows: root.dismissable.every(w => !w?.focusable) || root.dismissable.some(w => hasActive(w?.contentItem)) ? [...root.dismissable, ...root.persistent] : [...root.dismissable] active: root.dismissable.length > 0 onCleared: () => { root.dismiss(); From 1932dcbab8eb73bb27126d3ebc02d7b41b535ced Mon Sep 17 00:00:00 2001 From: altrup <51763643+altrup@users.noreply.github.com> Date: Mon, 12 Jan 2026 14:58:04 -0500 Subject: [PATCH 5/5] Add keyboardFocus.OnDemand to WallpaperSelector --- .../ii/modules/ii/wallpaperSelector/WallpaperSelector.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/dots/.config/quickshell/ii/modules/ii/wallpaperSelector/WallpaperSelector.qml b/dots/.config/quickshell/ii/modules/ii/wallpaperSelector/WallpaperSelector.qml index 5bd79b56b..9d9ba9008 100644 --- a/dots/.config/quickshell/ii/modules/ii/wallpaperSelector/WallpaperSelector.qml +++ b/dots/.config/quickshell/ii/modules/ii/wallpaperSelector/WallpaperSelector.qml @@ -25,6 +25,7 @@ Scope { exclusionMode: ExclusionMode.Ignore WlrLayershell.namespace: "quickshell:wallpaperSelector" WlrLayershell.layer: WlrLayer.Overlay + WlrLayershell.keyboardFocus: WlrKeyboardFocus.OnDemand color: "transparent" anchors.top: true