popout: let the content window take hyprland focus before whitelisting bars (#3745)

This commit is contained in:
cmleon51 authored and GitHub committed 2026-10-10 17:51:43 -04:00
1 parent 3e2d969e5d
commit 6f0674ff72
2 files changed
+5 -4

No files matched your search

+4 -4
View File
@@ -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)
+1
View File
@@ -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