diff --git a/quickshell/Widgets/DPopout.qml b/quickshell/Widgets/DPopout.qml index e9600af1d..b14dff07f 100644 --- a/quickshell/Widgets/DPopout.qml +++ b/quickshell/Widgets/DPopout.qml @@ -79,12 +79,12 @@ Item { // Hyprland OnDemand grab: whitelist popout surfaces and bars so dismiss clicks still land. DFocusGrab { windows: { - const list = []; - if (root.contentWindow) - list.push(root.contentWindow); + const list = root.contentWindow ? [root.contentWindow] : []; + const transientWindows = root.transientSurfaceTracker?.focusWindows ?? []; + if (!(impl.item?.contentActive ?? false) && !root.transientSurfaceTracker?.active) + return list.concat(transientWindows); if (root.backgroundWindow && root.backgroundWindow !== root.contentWindow) list.push(root.backgroundWindow); - const transientWindows = root.transientSurfaceTracker?.focusWindows ?? []; return list.concat(transientWindows).concat(KeyboardFocus.barWindows); } wanted: KeyboardFocus.wantsGrab(root.shouldBeVisible, root.customKeyboardFocus) diff --git a/quickshell/Widgets/DPopoutHost.qml b/quickshell/Widgets/DPopoutHost.qml index 97fb04615..7806e32fa 100644 --- a/quickshell/Widgets/DPopoutHost.qml +++ b/quickshell/Widgets/DPopoutHost.qml @@ -57,6 +57,7 @@ Item { property bool _contentRenderActive: Theme.isDirectionalEffect || shouldBeVisible // Keyboard focus grabbed one tick after emerge starts, to avoid stalling first frames. property bool _keyboardReady: false + readonly property bool contentActive: focusHelper.Window.active property bool _resizeActive: false property real _chromeAnimTravelX: 1 property real _chromeAnimTravelY: 1