1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-08 06:28:27 -04:00

launcher: fix hyprland focus on context menu

fixes #2714
This commit is contained in:
bbedward
2026-06-30 10:04:44 -04:00
parent 9d550d7c11
commit 161118122e
4 changed files with 21 additions and 4 deletions
@@ -25,6 +25,7 @@ Item {
property real anchorY: 0
property bool openState: false
property bool renderActive: false
readonly property alias contextWindow: menuWindow
readonly property bool blurActive: renderActive && openState && BlurService.enabled && Theme.connectedSurfaceBlurEnabled
readonly property real minMenuWidth: 180
@@ -446,7 +447,17 @@ Item {
WlrLayershell.namespace: "dms:launcher-context-menu"
WlrLayershell.layer: WlrLayershell.Overlay
WlrLayershell.exclusiveZone: -1
WlrLayershell.keyboardFocus: PopoutManager.screenshotActive ? WlrKeyboardFocus.None : (root.renderActive ? WlrKeyboardFocus.Exclusive : WlrKeyboardFocus.None)
// Hyprland steals the launcher's focus grab on exclusive focus; keep keys on the
// launcher window, which forwards them to the menu via handleKey().
WlrLayershell.keyboardFocus: {
if (PopoutManager.screenshotActive)
return WlrKeyboardFocus.None;
if (!root.renderActive)
return WlrKeyboardFocus.None;
if (CompositorService.useHyprlandFocusGrab)
return WlrKeyboardFocus.None;
return WlrKeyboardFocus.Exclusive;
}
anchors {
top: true