Skip to content

fix: unminimized window at wrong size after animation ends - #2491

Merged
Drakulix merged 1 commit into
pop-os:masterfrom
mayakwd:fix/unminimize-stale-size
Jul 13, 2026
Merged

Drakulix merged 1 commit into
pop-os:masterfrom
mayakwd:fix/unminimize-stale-size

Conversation

@mayakwd

@mayakwd mayakwd commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Fixes: pop-os/cosmic-epoch#2743

Problem
Screenshot_2026-06-19_20-25-03
After the unminimizing animation window receives the wrong size.

Root cause
FloatingLayout::recalculate reconfigures every floating window. When selecting the window geometry, it checks mapped.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, recalculate recomputes the geometry from the old, unmaximized size.

The configure it 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.

  • I have disclosed use of any AI generated code in my commit messages.
    • If you are using an LLM, and do not fully understand the changes it is making to the code base, do not create a PR.
    • In our experience, AI generated code often results in overly complex code that lacks enough context for a proper fix or feature inclusion. This results in considerably longer code reviews. Due to this, AI authored or partially authored PRs may be closed without comment.
  • I understand these changes in full and will be able to respond to review comments.
  • My change is accurately described in the commit message.
  • My contribution is tested and working as described.
  • I have read the Developer Certificate of Origin and certify my contribution under its conditions.

@mayakwd mayakwd changed the title fix: unminimized window at wrong size after animation end fix: unminimized window at wrong size after animation ends Jun 21, 2026
@mayakwd
mayakwd force-pushed the fix/unminimize-stale-size branch from 24e785e to 41678c8 Compare July 2, 2026 16:17
@jacobgkau
jacobgkau requested review from a team July 2, 2026 20:56
@jacobgkau jacobgkau self-assigned this Jul 2, 2026

@jacobgkau jacobgkau left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Drakulix Drakulix left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Drakulix
Drakulix merged commit 7a7c6b7 into pop-os:master Jul 13, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants