-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Windows bug: window size continues to increase or shrink across monitors of different magnifications #4712
Comments
I think this is the same issue as #3286 |
I think this is the correct behavior. If you have one monitor at 100% scale and another monitor at 200% scale, when you move from the 100% monitor to the 200% monitor, Windows will automatically double the size of your application window. If you want to avoid this behavior you have to tell Windows that your application is DPI aware (which is outside the scope of this issue) Please reopen this bug if what I'm describing isn't what's happening here. |
@slouken Hey, you've misinterpreted the issue - the bug is that the scaling 'continues' to occur - it doesn't stop and the window eventually becomes larger than the screen. |
I'm not sure how I reopen this thread. |
So let me see if I understand the steps: Do you have a video of this in action, or can we do a video call so I can see what's happening? |
@slouken The monitor on the left is at 100% scaling, the monitor on the right is at 150%. |
@hsdk123 is your application enabling DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2? I can reproduce this in SDL by enabling that DPI awareness level. Assuming your app is doing that: what's going on is DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 is promising Windows that we've made certain code changes in SDL which we actually haven't made yet, so we get this bad behaviour as a result. The specific call that is causing the infinite growth is the Further details on how to repro this: Display setup:
Steps:
|
The hint allows setting a specific DPI awareness ("unaware", "system", "permonitor", "permonitorv2"). This is the first part of High-DPI support on Windows ( libsdl-org#2119 ). It doesn't implement a virtualized SDL coordinate system, which will be addressed in a later commit. (This hint could be useful for SDL apps that want 1 SDL unit = 1 pixel, though.) Detecting and behaving correctly under per-monitor V2 (calling AdjustWindowRectExForDpi where needed) should fix the following issues: libsdl-org#3286 libsdl-org#4712
The hint allows setting a specific DPI awareness ("unaware", "system", "permonitor", "permonitorv2"). This is the first part of High-DPI support on Windows ( #2119 ). It doesn't implement a virtualized SDL coordinate system, which will be addressed in a later commit. (This hint could be useful for SDL apps that want 1 SDL unit = 1 pixel, though.) Detecting and behaving correctly under per-monitor V2 (calling AdjustWindowRectExForDpi where needed) should fix the following issues: #3286 #4712
Hi, I'm running into a bug where, if I have 2 monitors with different magnification scales, moving a window from one monitor to another, has the application window to continue shrinking or increasing each time I move. (this happens when the app window is sitting across both monitors)
The text was updated successfully, but these errors were encountered: