From 267bc00097cf50d19d4547e3ddb810a6c406ac72 Mon Sep 17 00:00:00 2001 From: ItsLemmy Date: Sat, 15 Nov 2025 09:17:21 -0500 Subject: [PATCH] SmartPanels: improving Hyprland focus issues. --- Modules/MainScreen/SmartPanelWindow.qml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Modules/MainScreen/SmartPanelWindow.qml b/Modules/MainScreen/SmartPanelWindow.qml index 68fadb2a..2d8f4266 100644 --- a/Modules/MainScreen/SmartPanelWindow.qml +++ b/Modules/MainScreen/SmartPanelWindow.qml @@ -61,7 +61,17 @@ PanelWindow { WlrLayershell.layer: WlrLayer.Top WlrLayershell.namespace: "noctalia-panel-content-" + placeholder.panelName + "-" + (placeholder.screen?.name || "unknown") WlrLayershell.exclusionMode: ExclusionMode.Ignore - WlrLayershell.keyboardFocus: !root.isPanelOpen ? WlrKeyboardFocus.None : (exclusiveKeyboard ? WlrKeyboardFocus.Exclusive : WlrKeyboardFocus.OnDemand) + WlrLayershell.keyboardFocus: { + if (!root.isPanelOpen) { + return WlrKeyboardFocus.None + } + if (CompositorService.isHyprland) { + // Exclusive focus on hyprland is too restrictive. + return WlrKeyboardFocus.OnDemand + } else { + return root.exclusiveKeyboard ? WlrKeyboardFocus.Exclusive : WlrKeyboardFocus.OnDemand + } + } // Anchor to all edges to make fullscreen anchors {