Multi-Monitor DPI scaling breaks dialog sizes #15304
Merged
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.
What does the pull request do?
There is a bug that the new window is the wrong size
It may be platform-specific since some platforms may have the possibility to set the window position + size in one call. Windows can't do that.
What is the current behavior?
The dialog should be 200x200 but it is not because a lot of things happen
2a. position - the window is moved to the center of the window on the secondary screen - but this immediately changes its size since these screens have different DPI settings
2b. the window had of course wrong size at this point but the resize callback breaks the window.Width and Height settings
2c. window sets the size - but the Width and Height is already broken
What is the updated/expected behavior with this PR?
Ignore Resize callbacks until the initial size is set
How was the solution implemented (if it's not obvious)?
ugly flag - maybe somebody has a better idea
no unit tests - feel free to add some