windows: Allow setting Windows titlebar separately from its resize border #4100
+323
−1
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.
Set
WS_CAPTION
separately to allow implementing custom titlebar while maintaining resize borders.Currently
MARKER_DECORATIONS
internal window flag is used for bothWS_CAPTION
andWS_BORDER
Also add a separate way to set the top resize border for windows without title bars to allow implementing custom title bars that would handle their own resizing from the top and thus avoid the default thick resize border at the top that Windows adds when there is no title bar.
Set via
TOP_RESIZE_BORDER
window flag and the corresponding methods to (un)set/check it. Requires manuall override ofWM_NCCALCSIZE
andWM_NCACTIVATE
to change the border of the non-client window area to 0 and prevent it from being redrawn on window activation eventscloses #3730
(for testing also used similar (but slightly different due to moving Win to dyn) changes on top of v0.30.8 in https://github.com/eugenesvk/winit/tree/v30_8)
changelog
module if knowledge of this change could be valuable to userstopless.rs
example that illustrates and allows live toggling of title bar/resize border/top resize border (for wins without a title bar))