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 <noreply@anthropic.com>
This commit is contained in:
1 parent
5e56abd877
commit
1f029922ec
1 file changed
+16
-2
+16
-2
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user