-
-
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 - set internal _shown flag if ShowWindow will make window visible #16029
Conversation
This solution leaves gaps. A window can be shown without hitting the method containing the new code, either because the window was directly manipulated by non-Avalonia code, or because another Avalonia type is showing it (e.g. popups). There must be a message which is sent to the window when this situation occurs, otherwise it wouldn't know to start repainting. We should identify it and set the bool when that message is received. |
ee724e5
to
c4ae3b7
Compare
We cannot account for changes users make to the window using native apis. As said in the pr description, WM_SHOWWINDOW message isn't sent when the show command is Maximize or Minimize. As for popups, they always shown with ShowNoActivate command, which will send the message. |
You can test this PR using the following package version. |
The proper message to use here is probably The |
c4ae3b7
to
5261367
Compare
This works quite well. Updated to use it. |
You can test this PR using the following package version. |
…le (#16029) * win32- set internal _shown flag if ShowWindow will make window visible * check window visibility state from WM_WINDOWPOSCHANGED message
…le (#16029) * win32- set internal _shown flag if ShowWindow will make window visible * check window visibility state from WM_WINDOWPOSCHANGED message
What does the pull request do?
Fixes an issue where, if a window starts out with window state Maximized, the
_shown
flag isn't set because Windows doesn't send the WM_SHOWWINDOW message for Maximize state. This flag is used internal for resize operations, and should be properly synced.What is the current behavior?
What is the updated/expected behavior with this PR?
How was the solution implemented (if it's not obvious)?
Checklist
Breaking changes
Obsoletions / Deprecations
Fixed issues