Bug 422549

Summary: Default window sizes not scaled with scale factor
Product: [Plasma] kwin Reporter: Nate Graham <nate>
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED NOT A BUG    
Severity: normal CC: kamikazow, kde, postix
Priority: NOR    
Version First Reported In: git master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Nate Graham 2020-06-06 19:48:54 UTC
OpenSUSE Tumbleweed with Qt 5.15 and all KDE software built from today's git master.

STEPS TO REPRODUCE
1. Set scale factor to 200%
2. Reboot
3. Open any app for the first time (or delete an app's config files and then open it again)

OBSERVED RESULT
The app's default size is tiny because its default size is not scale with the systemwide scale factor.

EXPECTED RESULT
The app window's default size is exactly the same physical size at 200% scale on a 4k screen as it would be at 100% scale on an FHD screen; KWin would automatically take care of scaling the initial size properly.
Comment 1 Christoph Feck 2020-06-29 21:03:34 UTC
The window manager cannot know if the application has provided a correct window size or not. To me, this is a WONTFIX (needs to be fixed in applications to report a proper window size, or in Qt if it needs to report the scaled size).
Comment 2 Nate Graham 2020-06-30 14:20:57 UTC
Yeah, you're probably right. So you think this should be implemented at the Qt or kxmlgui level? Or somewhere else? If individual apps need to do the correct thing, then we'll never have it fixed. :(
Comment 3 Christoph Feck 2020-06-30 15:31:08 UTC
Could you point me to a simple application that doesn't work? When I run kcalc or kcharselect with QT_SCALE_FACTOR=3, then the window is really bigger.
Comment 4 Nate Graham 2020-06-30 16:28:59 UTC
Okular
Comment 5 Nate Graham 2020-06-30 16:30:39 UTC
Note that QT_SCALE_FACTOR isn't mimicking what we really do; when using high DPI scaling, you wind up with QT_SCREEN_SCALE_FACTORS set instead.

And .kdeglobals has this:

ScaleFactor=2.5
ScreenScaleFactors=eDP-1=2.5;DP-1=2.5;HDMI-1=2.5;DP-2=2.5;
Comment 6 David Edmundson 2020-07-08 15:15:56 UTC
As cfeck said