Skip stale frame extents when maximizing/fullscreening - #2562
Open
gene1wood wants to merge 1 commit into
Open
Conversation
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.
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.
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