windows: Fix top border overlap#229
Open
3unjee wants to merge 1 commit into
Open
Conversation
wangwenx190
requested changes
May 25, 2026
Collaborator
wangwenx190
left a comment
There was a problem hiding this comment.
Thanks a lot! Only some minor issues
| }); | ||
|
|
||
| bool max; | ||
| bool full; |
Collaborator
There was a problem hiding this comment.
It seems you can initialize max and full with isMaximized() and isFullScreen() here? you didn't change their value in the following code block anyway, or am I missing something?
| // border ends up painted on top of the client area, covering the top of the content. | ||
| // So we shift the clientRect accordingly. This only applies when the window is not | ||
| // maximized or full-screen. | ||
| if (isWin11OrGreater() && max == false && full == false) { |
Collaborator
There was a problem hiding this comment.
Suggested change
| if (isWin11OrGreater() && max == false && full == false) { | |
| if (isWin11OrGreater() && !max && !full) { |
| } | ||
| else { | ||
| max = isMaximized(hWnd); | ||
| full = isFullScreen(hWnd); |
Collaborator
There was a problem hiding this comment.
you won't need these two lines if you initialize them early
| clientRect->top = originalTop; | ||
|
|
||
| max = isMaximized(hWnd); | ||
| full = isFullScreen(hWnd); |
Collaborator
There was a problem hiding this comment.
you won't need these two lines if you initialize them early
Collaborator
|
Sorry for the late review. I've been to hospital last week and have no access to PC/network ... |
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.
This PR fixes a top border overlap on Windows 11 by shifting the content accordingly.
NOTE: The issue can be tested from the main branch by adding a border of 1 pixel at the top of the QML window example, it gets hidden.