SmartPanels: improving Hyprland focus issues.

This commit is contained in:
ItsLemmy
2025-11-15 09:17:21 -05:00
parent a81cbb587e
commit 267bc00097
+11 -1
View File
@@ -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 {