Fix min size hint with Wayland CSD frame#4561
Open
LeonMatthes wants to merge 1 commit intorust-windowing:masterfrom
Open
Fix min size hint with Wayland CSD frame#4561LeonMatthes wants to merge 1 commit intorust-windowing:masterfrom
LeonMatthes wants to merge 1 commit intorust-windowing:masterfrom
Conversation
If a window is created with a minimum size hint and then needs client-side decorations on Wayland, the frame will actually reduce the real available size of the client application. This fix takes this into account and causes the window to correctly increase its size based on the height that the frame needs. Closes rust-windowing#4559
1 task
Author
|
Hm, CI is failing on an unrelated clippy warning (the X11 code is not changed by this PR). |
5 tasks
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.
If a window is created with a minimum size hint and then needs client-side decorations on Wayland, the frame will actually reduce the real available size of the client application.
This fix takes this into account and causes the window to correctly increase its size based on the height that the frame needs.
Closes #4559
I'm not an expert on how the Wayland protocol works so if there is a better way to do this I am happy to implement it.
Manually tested on niri by modifying the
applicationexample with a min/max size constraint of 500x500.Without this patch the logs contain:
With the patch it turns into:
(875 is 500 when taking the scale factor into account)
Added an entry to thechangelogmodule if knowledge of this change could be valuable to usersUpdated documentation to reflect any user-facing changes, including notes of platform-specific behaviorCreated or updated an example program if it would help users understand this functionality