1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-02 03:28:28 -04:00

popout: re-apply surface geometry after shouldBeVisible (#2983)

Popouts sized from their content sometimes open too short and clip what
they render, then come back correct on the next open.

open() snapshots the surface geometry before setting shouldBeVisible,
and the onAligned{X,Y,Width,Height}Changed handlers are all gated on
that flag. Mapping contentWindow happens in between, and that's what
finally runs the layout Qt deferred while the window was hidden.
Content-sized popouts pick up their real height in that gap, so the
correction is dropped and the surface stays short. Re-snapshot once the
flag is set.
This commit is contained in:
Connor Welsh
2026-08-02 01:30:21 -04:00
committed by GitHub
parent ef191babb7
commit 11287459c3
@@ -379,6 +379,9 @@ Item {
animationsEnabled = true;
shouldBeVisible = true;
// Content-sized popouts lay out when contentWindow maps, while the geometry
// handlers are still gated off. Re-snapshot so the surface isn't left short.
_setSettledSurfaceGeometry();
if (screen) {
PopoutManager.showPopout(popoutHandle);
opened();