-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Remembering previous size and position wrong in mixed DPI situation #5898
Comments
Does the issue also occur, when you
I think this is probably somehow related to the way we save and restore the window's geometry and position (by means of save/restoreGeometry. E.g. mumble/src/mumble/MainWindow.cpp Lines 443 to 446 in 600ffb4
|
I now did those two tests. Both worked perfectly, The window reopened exactly where it was closed, and at exactly the same dimensions (both to the pixel). I did more tests: NewTest1
Effect: it opens at the same dimensions as when closed. NewTest2
Effect: it opens too small (like in my first post) NewTest3 - the inverse of my initial bug report
Effect: it opens too big and position moves slightly down and to the right. (This seems coherent with my initial report, where it got smaller and slightly moved to the top left when primary at 150% and secondary at 100%) My assumptionthough not sure if sound
reason for saying "one or more display metrics": while never having worked with qt, I know window decoration metrics are their own source of problems when positioning windows programmatically. Since they're also different on both screens, they may account for the window slightly moving around. (Imo best tracking down the dimensions bug first, maybe the position problem goes away with it). -- NewTest4
Effect: it opens at the same dimensions as when closed (relative to the screen size), meaning same outline, less visible content (because of bigger font/icons). NewTest5
Effect: it opens at smaller dimensions than when closed (relative to the screen size), meaning exact same visible content |
Yeah, I think your display metrics theory sounds very likely. The only question remaining is whether this is a bug in our code base or a bug somewhere in Qt. Do you have other Qt programs installed on your system? If so, do they suffer from the same issues? |
I have DupeGuru installed on my system (a duplicate file finder), it uses Qt and does not suffer from the same issues. |
Okay, then the issue is probably somewhere in our code. |
I have this issue as well everytime I open Mumble the window size and position is wrong. All my other applications don't have this problem. |
Description
I have two screens at different DPI scaling on Windows 10.
Mumble client resides on secondary screen. (not fullscreen).
When closing and reopening mumble, it will open at a much smaller size, and at a position slightly more to the top left.
Screenshots attached below.
Quickly comparing the window size, it is in fact smaller at a factor of 150%.
(682 pixels wide to 454 pixels wide, 682/454 = 1.502..)
Steps to reproduce
Mumble version
1.4.287
Mumble component
Client
OS
Windows
Reproducible?
Yes
Additional information
works as expected when closing and re-opening on primary screen: reopens at the same size and position (note: I did not measure pixels)
bug also happens when mumble window does not touch the border of the screen (tested at the center of the secondary screen) : So not related to it almost touching the primary screen, which with the position bug could have had it pick dpi from wrong screen.
this problem is not new. I can't say how old, because I only have a second screen since <1 year.
this bug may go back to at least 2017, seeing issue Bad Window default sizes on high-DPI system #3248 sounding similar (only open issue I found that sounds similar). I did a new issue because two much may have changed since, and that issue is not very detailed.
I am currently working around this by using PowerToys FancyZones with the option the restore the window at its previous zone. Note this is not ideal because it rarely triggers what is maybe an other bug: mumble window contents did once not resize to the bigger window, but this may even be a qt problem. (I only set this up now, so only 5 tries so far). If I encouter this more often, I will do a separate bug report.
Relevant log output
No response
Screenshots
Size as set by me:

Size after closing and reopening:

Size after closing and reopening a second time:

Position and size as set by me:

Position and size after closing and reopening:

Position and size after closing and reopening a second time:

The text was updated successfully, but these errors were encountered: