mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-10-30 06:57:49 -04:00
popout: let the content window take hyprland focus before whitelisting bars (#3745)
This commit is contained in:
1 parent
3e2d969e5d
commit
6f0674ff72
2 files changed
+5
-4
No files matched your search
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user