wayland: xdg_surface configuration improvements - #18280
Open
mahkoh wants to merge 2 commits into
Open
Conversation
After a configure sequence, the compositor waits for the client to commit. This is necessary to synchronize changes. For example: 1. Window is focused. 2. Window loses focus. 3. Compositor sends configuration sequence. 4. Client acks and commits. 5. Compositor redraws the window decorations as unfocused. Without the synchronization with the configuration sequence, the window contents might show an "unfocused" state while the decorations show a "focused" state and vice versa. mpv does not change its look when focused/unfocused but the compositor cannot know this and many applications do this. It would be sufficient to wl_surface_commit instead of ORing VO_EVENT_EXPOSE, but this seems to be the safer way and configuration sequences are rare.
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mahkoh
force-pushed
the
jorth/xdg-surface-configure
branch
from
July 22, 2026 13:36
09a0839 to
d1aa21b
Compare
xdg_surface.configure can occur with a delay after xdg_toplevel.configure and there can be more than one xdg_toplevel.configure events between xdg_surface.configure events. As per xdg_toplevel.configure: > The configured state should not be applied immediately. See > xdg_surface.configure for details.
mahkoh
force-pushed
the
jorth/xdg-surface-configure
branch
from
July 22, 2026 13:38
d1aa21b to
a630518
Compare
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.
wayland: trigger redraw after every configure sequence
After a configure sequence, the compositor waits for the client to
commit. This is necessary to synchronize changes. For example:
Without the synchronization with the configuration sequence, the window
contents might show an "unfocused" state while the decorations show a
"focused" state and vice versa.
mpv does not change its look when focused/unfocused but the compositor
cannot know this and many applications do this.
It would be sufficient to wl_surface_commit instead of ORing
VO_EVENT_EXPOSE, but this seems to be the safer way and configuration
sequences are rare.
wayland: defer config sequence application
xdg_surface.configure can occur with a delay after
xdg_toplevel.configure and there can be more than one
xdg_toplevel.configure events between xdg_surface.configure events.
As per xdg_toplevel.configure: