Skip to content

Skip stale frame extents when maximizing/fullscreening - #2562

Open
gene1wood wants to merge 1 commit into
pop-os:masterfrom
gene1wood:fix-window-extending-beyond-display
Open

Skip stale frame extents when maximizing/fullscreening#2562
gene1wood wants to merge 1 commit into
pop-os:masterfrom
gene1wood:fix-window-extending-beyond-display

Conversation

@gene1wood

Copy link
Copy Markdown

PR #2441 added the client's advertised _GTK_FRAME_EXTENTS to the geometry sent in configure_with_sync() so XWayland CSD windows (e.g. Firefox) wouldn't shrink. But set_maximized()/set_geometry() are called back-to-back, and Smithay's internal maximized/fullscreen state updates synchronously while the client's _GTK_FRAME_EXTENTS does not update until it processes the configure. This meant the window was briefly configured larger than the output using its old, pre-maximize shadow extents, leaving it jutting past the screen edge until an unrelated reconfigure (e.g. focus change on alt-tab) caught up with the client's now-zeroed extents.

GTK clients always drop their CSD shadows when maximized or fullscreen, so once is_maximized()/is_fullscreen() report true, skip frame_extents() and use zero instead of waiting for the client to confirm it.

Fixes #2503

  • 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.

PR pop-os#2441 added the client's advertised _GTK_FRAME_EXTENTS to the
geometry sent in configure_with_sync() so XWayland CSD windows (e.g.
Firefox) wouldn't shrink. But set_maximized()/set_geometry() are
called back-to-back, and Smithay's internal maximized/fullscreen
state updates synchronously while the client's _GTK_FRAME_EXTENTS
does not update until it processes the configure. This meant the
window was briefly configured larger than the output using its old,
pre-maximize shadow extents, leaving it jutting past the screen edge
until an unrelated reconfigure (e.g. focus change on alt-tab) caught
up with the client's now-zeroed extents.

GTK clients always drop their CSD shadows when maximized or
fullscreen, so once is_maximized()/is_fullscreen() report true, skip
frame_extents() and use zero instead of waiting for the client to
confirm it.
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.

PR #2441 Introduces Stale Frame Extents on Maximize

1 participant