From 1f029922ecc011003f5459e4fe7d227ab9ae2073 Mon Sep 17 00:00:00 2001 From: mx Date: Sat, 14 Nov 2026 15:02:09 +0100 Subject: [PATCH] Start the notch search's focus grab after the bar takes the keyboard Started together, Hyprland cleared the grab at once and closed the search, so SUPER+D did nothing visible. Co-Authored-By: Claude Opus 5.5 --- quickshell/bar/Bar.qml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/quickshell/bar/Bar.qml b/quickshell/bar/Bar.qml index 00fe43e..5fb3b8a 100644 --- a/quickshell/bar/Bar.qml +++ b/quickshell/bar/Bar.qml @@ -38,10 +38,24 @@ PanelWindow { // a click anywhere else closes it. readonly property bool searching: notch && ShellState.notchSearch && ScreenService.current(ShellState.launcherScreen) === screen WlrLayershell.keyboardFocus: searching ? WlrKeyboardFocus.Exclusive : WlrKeyboardFocus.None + // The grab starts once the bar holds the keyboard; started together with + // the focus change, Hyprland clears it at once and the search closes. + property bool grabbing: false + onSearchingChanged: { + grabbing = false; + if (searching) + grabStart.restart(); + } + Timer { + id: grabStart + interval: 150 + onTriggered: root.grabbing = root.searching + } HyprlandFocusGrab { windows: [root] - active: root.searching - onCleared: ShellState.launcherOpen = false + active: root.grabbing + onCleared: if (root.grabbing) + ShellState.launcherOpen = false } Component.onCompleted: TrayService.registerBar(root) Component.onDestruction: TrayService.unregisterBar(root)