SmartPanel: added exclusiveKeyboard flag. Should fix launcher focus on hyprland.

This commit is contained in:
ItsLemmy
2025-11-12 08:00:59 -05:00
parent e35239d512
commit e67f27f58d
3 changed files with 10 additions and 1 deletions
+5 -1
View File
@@ -63,7 +63,11 @@ PanelWindow {
if (CompositorService.isNiri) {
return root.isPanelOpen ? WlrKeyboardFocus.Exclusive : WlrKeyboardFocus.None
} else {
return root.isPanelOpen ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None
if (!root.isPanelOpen) {
return WlrKeyboardFocus.None
} else {
return PanelService.openedPanel.exclusiveKeyboard ? WlrKeyboardFocus.Exclusive : WlrKeyboardFocus.OnDemand
}
}
}
+3
View File
@@ -43,6 +43,9 @@ Item {
// Edge snapping: if panel is within this distance (in pixels) from a screen edge, snap
property real edgeSnapDistance: 50
// Edge snapping: if panel is within this distance (in pixels) from a screen edge, snap
property bool exclusiveKeyboard: false
// Track whether panel is open
property bool isPanelOpen: false
+2
View File
@@ -19,6 +19,8 @@ SmartPanel {
preferredWidthRatio: 0.3
preferredHeightRatio: 0.5
exclusiveKeyboard: true
panelBackgroundColor: Qt.alpha(Color.mSurface, Settings.data.appLauncher.backgroundOpacity)
// Positioning