From e67f27f58dafe98eedceef68a79ee51aa6e6bbe2 Mon Sep 17 00:00:00 2001 From: ItsLemmy Date: Wed, 12 Nov 2025 08:00:59 -0500 Subject: [PATCH] SmartPanel: added exclusiveKeyboard flag. Should fix launcher focus on hyprland. --- Modules/MainScreen/MainScreen.qml | 6 +++++- Modules/MainScreen/SmartPanel.qml | 3 +++ Modules/Panels/Launcher/Launcher.qml | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Modules/MainScreen/MainScreen.qml b/Modules/MainScreen/MainScreen.qml index 3187ebc7..24c6f873 100644 --- a/Modules/MainScreen/MainScreen.qml +++ b/Modules/MainScreen/MainScreen.qml @@ -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 + } } } diff --git a/Modules/MainScreen/SmartPanel.qml b/Modules/MainScreen/SmartPanel.qml index 58cabc37..e7330f13 100644 --- a/Modules/MainScreen/SmartPanel.qml +++ b/Modules/MainScreen/SmartPanel.qml @@ -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 diff --git a/Modules/Panels/Launcher/Launcher.qml b/Modules/Panels/Launcher/Launcher.qml index 9747b3ee..ca8fc07a 100644 --- a/Modules/Panels/Launcher/Launcher.qml +++ b/Modules/Panels/Launcher/Launcher.qml @@ -19,6 +19,8 @@ SmartPanel { preferredWidthRatio: 0.3 preferredHeightRatio: 0.5 + exclusiveKeyboard: true + panelBackgroundColor: Qt.alpha(Color.mSurface, Settings.data.appLauncher.backgroundOpacity) // Positioning