mirror of
https://github.com/mumble-voip/mumble.git
synced 2026-03-03 00:46:56 -05:00
Remembering previous size and position wrong in mixed DPI situation #2581
Labels
No labels
GlobalShortcuts
Hacktoberfest
accessibility
acl
asio
audio
bonjour
bsd
bug
build
certificate
ci
client
code
documentation
external-bug
feature-request
gRPC
github
good first issue
help wanted
help-needed
ice
installer
linux
macOS
needs-ckeck-with-latest-version
needs-more-input
overlay
positional audio
priority/P0 - Blocker
priority/P1 - Critical
priority/P2 - Important
priority/P3 - Somewhat important
priority/P4 - Low
public-server-registration
qt
recording
release-management
server
stale-no-response
stale-support
support
task
test
theme
translation
triage
ui
windows
wontfix
x64
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/mumble-mumble-voip#2581
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @lePoMo on GitHub (Sep 25, 2022).
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 #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:

@Krzmbrzl commented on GitHub (Sep 26, 2022):
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.
github.com/mumble-voip/mumble@600ffb476a/src/mumble/MainWindow.cpp (L443-L446)@lePoMo commented on GitHub (Sep 26, 2022):
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 assumption
though not sure if sound
Hence when both screens have same dpi, the bug is hidden
Hence the bug does not happen if the window is closed and reopened on the primary screen (when primary 150, secondary 100)
And hence when the secondary screen has smaller dpi, the window dimensions shrink, and vice versa the dimensions increase when the secondary has higher dpi than the primary screen.
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).
--
The following two also tested, but now noticing that there is no right answer for these, because I am switchting the secondary screen dpi. Maybe they can still help nonetheless:
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
@Krzmbrzl commented on GitHub (Sep 27, 2022):
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?
@lePoMo commented on GitHub (Sep 27, 2022):
I have DupeGuru installed on my system (a duplicate file finder), it uses Qt and does not suffer from the same issues.
https://github.com/arsenetar/dupeguru/
@Krzmbrzl commented on GitHub (Sep 28, 2022):
Okay, then the issue is probably somewhere in our code.
@Aqualie commented on GitHub (Feb 25, 2023):
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.