keepassxreboot / keepassxc

KeePassXC is a cross-platform community-driven port of the Windows application “Keepass Password Safe”.
https://keepassxc.org/
Other
21.39k stars 1.48k forks source link

Window shrinkage from waking up PC #11447

Closed nevaran closed 1 week ago

nevaran commented 2 weeks ago

Overview

Extremely often, but seemingly not always, the actual window will completely shrink down, sometimes the real size will have a ghosting effect where it will just break usability, and will not get fixed unless the program is closed and opened again. Context menu on the taskbar tray also gets sized down.

Difference compared: image image

Steps to Reproduce

  1. Put computer to sleep, unknown if the window needs to be open or not
  2. Wake up PC
  3. Shrinkage.

Expected Behavior

Unchanged window size

Actual Behavior

Cold crotch phenomenon

KeePassXC - Version 2.7.9 Revision: 8f6dd13

Qt 5.15.11 Debugging mode is disabled.

Operating system: Windows 11 Version 2009 (note: shows 2033 on actual windows) CPU architecture: x86_64 Kernel: winnt 10.0.26100

Enabled extensions:

Cryptographic libraries:

NOTE: Operating System: Windows 11 Dual monitor setup, 1440p@125%(primary) scale and 1080p@100% scale

droidmonkey commented 2 weeks ago

Your screenshots look exactly the same.

Since you are running two very different sized monitors, you should try explicitly setting the screen scale factors using qt environment variables, specifically this one: QT_SCREEN_SCALE_FACTORS

https://keepassxc.org/docs/KeePassXC_UserGuide#_command_line_options

nevaran commented 2 weeks ago

There was no such issues before prior to version 2.7.9 and Windows 10. Also yes a bit difficult to distinguish the screenshots, but you can see compared to the icons at the bottom they are bigger on the shrunk down version, and the normal window (second screenshot) has more screen space taken to the right to the point where other icons are showing to fit the whole window.

About the screen scale factors, what about it working with autostart?

phoerious commented 1 week ago

Windows is known to do that if you have monitors with different scaling factors. Even the Windows Explorer does that. It's usually fixed by either resizing the window or moving it between monitors.

nevaran commented 1 week ago

I did try to resize the window and nothing happened. Also as i mentioned in the original post - even the tray icon's context menu is resized down. Not sure whats up with that. I havent tried to move it between windows though, im gonna try that next time it happens

droidmonkey commented 1 week ago

This is a qt problem which hopefully gets addressed when we move to qt6. Nothing much we can do about it unfortunately.

nevaran commented 1 week ago

Gotcha, thanks for the information and awesome software :) Just got my hands on vaultwarden and its really not that good for storing everything.

nevaran commented 1 week ago

Confirmed, moving to the 100% scaled monitor and back to the other one fixes the scaling issue. Might be something to do with the 100% one being on HDMI while the other is DP, since the HDMI is always active

phoerious commented 1 week ago

That's a Windows bug.

nevaran commented 1 week ago

Its not impossible...ive already found one sort of breaking bug on 11 where the second monitor's taskbar will have ghost tabs of firefox open. Mildly regretting switching over to it