From 2f3701978279788551eb4c31843adfa59c93a7b8 Mon Sep 17 00:00:00 2001 From: Ralph Zhou <36948728+awerty-noob@users.noreply.github.com> Date: Thu, 18 Jun 2026 13:41:25 +0800 Subject: [PATCH] fix(popouts): keep Hyprland focus during close (#2655) --- quickshell/Widgets/DankPopout.qml | 2 +- quickshell/Widgets/DankPopoutConnected.qml | 4 ++-- quickshell/Widgets/DankPopoutStandalone.qml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/quickshell/Widgets/DankPopout.qml b/quickshell/Widgets/DankPopout.qml index 1fc6c347..690ba66e 100644 --- a/quickshell/Widgets/DankPopout.qml +++ b/quickshell/Widgets/DankPopout.qml @@ -63,7 +63,7 @@ Item { list.push(root.backgroundWindow); return list.concat(KeyboardFocus.barWindows); } - active: KeyboardFocus.wantsGrab(root.shouldBeVisible, root.customKeyboardFocus) + active: KeyboardFocus.wantsGrab(root.shouldBeVisible || root.isClosing, root.customKeyboardFocus) } Loader { diff --git a/quickshell/Widgets/DankPopoutConnected.qml b/quickshell/Widgets/DankPopoutConnected.qml index 3d88a5ce..d0221b82 100644 --- a/quickshell/Widgets/DankPopoutConnected.qml +++ b/quickshell/Widgets/DankPopoutConnected.qml @@ -493,8 +493,8 @@ Item { interval: Theme.variantCloseInterval(animationDuration) onTriggered: { if (!shouldBeVisible) { - isClosing = false; contentWindow.visible = false; + isClosing = false; PopoutManager.hidePopout(popoutHandle); popoutClosed(); } @@ -782,7 +782,7 @@ Item { WlrLayershell.namespace: root.layerNamespace WlrLayershell.layer: root.effectivePopoutLayer WlrLayershell.exclusiveZone: -1 - WlrLayershell.keyboardFocus: KeyboardFocus.keyboardFocus(shouldBeVisible, customKeyboardFocus) + WlrLayershell.keyboardFocus: KeyboardFocus.keyboardFocus(shouldBeVisible || isClosing, customKeyboardFocus) readonly property bool _fullHeight: root.fullHeightSurface anchors { diff --git a/quickshell/Widgets/DankPopoutStandalone.qml b/quickshell/Widgets/DankPopoutStandalone.qml index 783388ae..894d21d2 100644 --- a/quickshell/Widgets/DankPopoutStandalone.qml +++ b/quickshell/Widgets/DankPopoutStandalone.qml @@ -376,9 +376,9 @@ Item { interval: Theme.variantCloseInterval(animationDuration) onTriggered: { if (!shouldBeVisible) { - isClosing = false; contentWindow.visible = false; backgroundWindow.visible = false; + isClosing = false; PopoutManager.hidePopout(popoutHandle); popoutClosed(); } @@ -607,7 +607,7 @@ Item { WlrLayershell.namespace: root.layerNamespace WlrLayershell.layer: root.effectivePopoutLayer WlrLayershell.exclusiveZone: -1 - WlrLayershell.keyboardFocus: KeyboardFocus.keyboardFocus(shouldBeVisible, customKeyboardFocus) + WlrLayershell.keyboardFocus: KeyboardFocus.keyboardFocus(shouldBeVisible || isClosing, customKeyboardFocus) anchors { left: true