diff --git a/quickshell/Modules/DIsland/DIslandHostWindow.qml b/quickshell/Modules/DIsland/DIslandHostWindow.qml index 415c19737..ac1c126d2 100644 --- a/quickshell/Modules/DIsland/DIslandHostWindow.qml +++ b/quickshell/Modules/DIsland/DIslandHostWindow.qml @@ -28,6 +28,14 @@ Item { return root.body?.containsGlobalPoint(gx, gy, padding) ?? false; } + // The focus grab must include the dismiss layer, or Hyprland eats the first outside click to end the grab. + Binding { + target: root.body + property: "dismissWindow" + value: dismissWindow + when: !!root.body + } + PanelWindow { id: dismissWindow diff --git a/quickshell/Modules/DIsland/IslandBarHost.qml b/quickshell/Modules/DIsland/IslandBarHost.qml index cfb9db4d1..5c3243252 100644 --- a/quickshell/Modules/DIsland/IslandBarHost.qml +++ b/quickshell/Modules/DIsland/IslandBarHost.qml @@ -177,6 +177,7 @@ Item { readonly property int keyboardFocusPolicy: KeyboardFocus.keyboardFocus(controller.keyboardDismissRequested && root.keyboardFocusArmed && !controller.keyboardYielded, null) readonly property bool wantsFocusGrab: KeyboardFocus.wantsGrab(controller.keyboardDismissRequested && !controller.keyboardYielded, null) readonly property var transientFocusWindows: islandTransientSurfaces.focusWindows + property var dismissWindow: null readonly property string registryKey: IslandHostRegistry.key(root.screen?.name, root.barId) property string registeredKey: "" diff --git a/quickshell/Modules/DIsland/IslandHostChrome.qml b/quickshell/Modules/DIsland/IslandHostChrome.qml index 6f7e12108..646346d6d 100644 --- a/quickshell/Modules/DIsland/IslandHostChrome.qml +++ b/quickshell/Modules/DIsland/IslandHostChrome.qml @@ -14,6 +14,6 @@ DFocusGrab { readonly property var maskItem: root.host && !root.host.inputSuspended ? root.host.inputMaskItem : null readonly property var fittsStripItem: root.host && !root.host.inputSuspended ? root.host.fittsStripItem : null - windows: [root.window].concat(root.extraWindows, root.host?.transientFocusWindows ?? []) + windows: [root.window].concat(root.extraWindows, root.host?.dismissWindow ?? [], root.host?.transientFocusWindows ?? []) wanted: root.host?.wantsFocusGrab ?? false }