-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Resize the drag bar on WM_DISPLAYCHANGE
#4829
Conversation
@msftbot make sure @DHowett signs off |
Hello @DHowett-MSFT! Because you've given me some instructions on how to help merge this pull request, I'll be modifying my merge approach. Here's how I understand your requirements for merging this pull request:
If this doesn't seem right to you, you can tell me to cancel these instructions and use the auto-merge policy that has been configured for this repository. Try telling me "forget everything I just told you". |
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.
Love it. I'm manually merging this to avoid a bot bug
## Summary of the Pull Request Add a `SizeChanged` handler to the titlebar content UI element. It's possible that this element's size will change after the dragbar's. When that happens, the drag bar won't send another `SizeChanged` event, because the dragbar's _size_ didn't change, only it's position. ## References We originally duped this issue to #4166, but after #4829 fixed that issue, this one persisted. They're all related, and _look_ like dupes, but they weren't. ## PR Checklist * [x] Closes #4288 * [x] I work here * [ ] Tests added/passed * [n/a] Requires documentation to be updated ## Detailed Description of the Pull Request / Additional comments ## Validation Steps Performed I had a solid 100% repro that doesn't repro anymore. I've maximized, restored, resized, and generally played with the window a bunch.
## Summary of the Pull Request Add a `SizeChanged` handler to the titlebar content UI element. It's possible that this element's size will change after the dragbar's. When that happens, the drag bar won't send another `SizeChanged` event, because the dragbar's _size_ didn't change, only it's position. ## References We originally duped this issue to #4166, but after #4829 fixed that issue, this one persisted. They're all related, and _look_ like dupes, but they weren't. ## PR Checklist * [x] Closes #4288 * [x] I work here * [ ] Tests added/passed * [n/a] Requires documentation to be updated ## Detailed Description of the Pull Request / Additional comments ## Validation Steps Performed I had a solid 100% repro that doesn't repro anymore. I've maximized, restored, resized, and generally played with the window a bunch.
## Summary of the Pull Request Add a `SizeChanged` handler to the titlebar content UI element. It's possible that this element's size will change after the dragbar's. When that happens, the drag bar won't send another `SizeChanged` event, because the dragbar's _size_ didn't change, only it's position. ## References We originally duped this issue to #4166, but after #4829 fixed that issue, this one persisted. They're all related, and _look_ like dupes, but they weren't. ## PR Checklist * [x] Closes #4288 * [x] I work here * [ ] Tests added/passed * [n/a] Requires documentation to be updated ## Detailed Description of the Pull Request / Additional comments ## Validation Steps Performed I had a solid 100% repro that doesn't repro anymore. I've maximized, restored, resized, and generally played with the window a bunch.
## Summary of the Pull Request Add a `SizeChanged` handler to the titlebar content UI element. It's possible that this element's size will change after the dragbar's. When that happens, the drag bar won't send another `SizeChanged` event, because the dragbar's _size_ didn't change, only it's position. ## References We originally duped this issue to #4166, but after #4829 fixed that issue, this one persisted. They're all related, and _look_ like dupes, but they weren't. ## PR Checklist * [x] Closes #4288 * [x] I work here * [ ] Tests added/passed * [n/a] Requires documentation to be updated ## Detailed Description of the Pull Request / Additional comments ## Validation Steps Performed I had a solid 100% repro that doesn't repro anymore. I've maximized, restored, resized, and generally played with the window a bunch.
Summary of the Pull Request
Pretty straightforward. When we get a
WM_DISPLAYCHANGE
, that means the display's DPI changed. When that happens, resize the drag bar, so that it'll reflect the new scaling.References
I'm doing this to unblock #4778
PR Checklist
Validation Steps Performed
Man I've changed the DPI of my displays so many times in the last 30 minutes. I draged the window across a bunch of DPI boundaries too.