wayland: Add opt-in border inset window properties - #16108
Open
svncibrahim wants to merge 1 commit into
Open
Conversation
Kontrabant
requested changes
Aug 3, 2026
Kontrabant
left a comment
Contributor
There was a problem hiding this comment.
A few initial comments.
Just to let you know, I'm going to be traveling later this week, and won't be back until near the end of the month, so if I'm slow to respond, that's why. A final merge will have to wait until I'm back as well.
svncibrahim
force-pushed
the
wayland-border-insets
branch
from
August 3, 2026 18:23
88c880a to
0b1ca47
Compare
Applications drawing client-side decorations (shadows, invisible resize borders) can declare their insets via four new window properties. SDL sets the xdg geometry to the surface minus the insets and translates configure sizes, size limits and popup positioning accordingly. All-zero insets (the default) leave protocol traffic unchanged; the configure-size dedup becomes state-aware so a maximize/fullscreen toggle at unchanged dimensions is re-adopted rather than skipped.
svncibrahim
force-pushed
the
wayland-border-insets
branch
from
August 4, 2026 21:23
0b1ca47 to
5783dfb
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.
Description
A client that draws its own decorations (shadows, an invisible resize border) has no way on Wayland to declare that the window geometry is the surface minus those insets, so snap, tile and maximize align to the surface edges instead of the visible content.
This adds four opt-in window properties:
When set, SDL sets the xdg window geometry to the surface minus the insets and translates configure sizes, size limits and popup positioning accordingly. All-zero insets (the default) leave the geometry call and the protocol traffic identical to today.
The insets apply only to xdg-toplevel windows and are skipped while maximized or fullscreen, where an exact size is required. The configure-size dedup is now state-aware, so a maximize or fullscreen toggle at unchanged dimensions is re-adopted instead of skipped.
Existing Issue(s)