Repository navigation
fix: unminimized window at wrong size after animation ends - #2491
Merged
Merged
Conversation
mayakwd
force-pushed
the
fix/unminimize-stale-size
branch
from
July 2, 2026 16:17
24e785e to
41678c8
Compare
jacobgkau
approved these changes
Jul 2, 2026
jacobgkau
left a comment
Member
There was a problem hiding this comment.
I was able to recreate pop-os/cosmic-epoch#2743 by performing the repro steps on top of another window that's maximized. Confirmed this fixes it. Not seeing any regressions regarding maximized windows keeping their state during other times this recalculate function's used, like when the display scale changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: pop-os/cosmic-epoch#2743
Problem

After the unminimizing animation window receives the wrong size.
Root cause
FloatingLayout::recalculatereconfigures every floating window. When selecting the window geometry, it checksmapped.is_maximized(false), which reflects the committed maximized state. Right after unminimization, the client hasn't acked the maximize yet, so the committed state is still not maximized. As a result,recalculaterecomputes the geometry from the old, unmaximized size.The
configureit sends still has the pending-maximized flag set, so the client receives an unmaximized size with the maximized state and renders it small, thinking it's maximized.Fix
Use the geometry from the pending maximized state (
is_maximized(true)) instead of the committed one - intended state, not the client has acked yet.