-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Win32 - Only update window position on extended client changed when window is visible #14954
Conversation
You can test this PR using the following package version. |
2d1df9c
to
207efa1
Compare
207efa1
to
02ebadc
Compare
You can test this PR using the following package version. |
02ebadc
to
50a5f3e
Compare
You can test this PR using the following package version. |
|
||
if (newProperties.Decorations == SystemDecorations.Full) | ||
if (_shown || forceChanges) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line causes #16529. Remove it and the window opens at the correct location.
What does the pull request do?
Only sets frame margins when window is visible.
What is the current behavior?
Currently, when system decorations change, the window frame margins are updated, even if the window is not visible yet. If the window isn't shown yet, and the SystemDecoration property is set after Width/Height are set, it forces a size update, and ClientSize is set before the window's Width and Height is applied, thus discarding the Width/Height properties.
What is the updated/expected behavior with this PR?
If window isn't shown, and decorations have been set, update extended margins, but don't set position yet. But if it's being shown, force a frame update after the initial size is set.
How was the solution implemented (if it's not obvious)?
Checklist
Breaking changes
Obsoletions / Deprecations
Fixed issues
Fixes #14942