-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Preventing repositioning logic in WM_DPICHANGED from during a Window::set_fullscreen() call
#4305
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
base: v0.30.x
Are you sure you want to change the base?
Conversation
…ow::set_fullscreen()` call This might not be the best fix, and it should probably be extended to cover cases where a window is repositioned beyond `Window::set_fullscreen()`
|
@kchibisov indeed, I have not. At first glance this seems to be a similar, but not identical problems.
These are two different scenarios whose only commonality is they both involve suppressing the window size DPI adjustment. And ironically, I just upgraded to Windows 11 yesterday and have confirmed that the problem my PR addresses is still happening on Windows 11. So #4119 didn't help that scenario. |
| let position: (i32, i32) = monitor.position().into(); | ||
| let size: (u32, u32) = monitor.size().into(); | ||
|
|
||
| window_state.lock().unwrap().currently_repositioning = true; |
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.
We have a bunch of SetWindowPos calls, wouldn't it be the problem for all of them, if so we would need to probably wrap it, somehow.
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.
Like, I wonder why fullscreen is special here, if maximize is probably the same, though, I'm not familiar with windows much? I'd assume that the point if you change position to other monitor?
|
When I worked on this PR, I was not aware of #4119; it was not clear to me why we were doing a bunch of adjustments for After reading the chatter #4119; it sounds like to me that the reason for handling
It would be nice to understand the original reason for handling |
It seems like other PR is taking care of this, right? And for this, I'd assume that If that's the case, we can probably detect the drag and only apply logic when the drag actually happens, as you say? |
That's what I've found. |
|
Reading through that thread, I see lots of chatter, and even a few test cases, but if there is a description of the human visible behavior they are trying to work around somewhere, I have not been able to find it. I have a crazy idea - stop resizing windows in response to |
|
I think what they wanted to do is preserve physical size on screen, to some extent, I guess. |
|
I suppose that I understand that part, but if there is a list of confirmed scenarios where this does happen and does not happen, I have not seen it. The PR that I filed describes a scenario where this logic interferes with a legitimate operation, so arguably there is at least one scenario where the current logic detracts from that goal. |
This might not be the best fix, and it should probably be extended to cover cases where a window is repositioned beyond
Window::set_fullscreen()Feel free to reject this if there is a better way to go!