Bug 387736

Summary: Last window size restored (correctly) only for most left display
Product: [Frameworks and Libraries] frameworks-kconfig Reporter: hugor.hugolin
Component: generalAssignee: Matthew Dawson <matthew>
Status: RESOLVED DUPLICATE    
Severity: normal CC: kdelibs-bugs, nate
Priority: NOR    
Version: 5.47.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
URL: https://bugreports.qt.io/browse/QTBUG-50788
Latest Commit: Version Fixed In:

Description hugor.hugolin 2017-12-09 11:41:48 UTC
Inside KWindowConfig::restoreWindowSize
const QRect desk = window->screen()->geometry();
always returns resolution of the most left screen (regardless whether it is primary and regardless of where the window actually appears).

This seems to be the same bug as reported here: https://bugreports.qt.io/browse/QTBUG-50788

This have a nasty effect that when you open kf5 application it always has [a size it had last time when it was closed on most left screen].


Even if it is found out that this is a qt-bug workaround is probably possible, because the virtually same code inside KWindowConfig::saveWindowSize returns correct screen.
Comment 1 hugor.hugolin 2018-07-14 10:37:12 UTC
The bug is also reproducible on Wayland.
Restoring last window size basically works only on the most left screen!

I wonder how can anybody use kf5 applications on any setup where your most used screen is not on the left.
Comment 2 Nate Graham 2018-07-15 03:38:54 UTC
Since you've identified the code responsible, any chance you'd be interested in producing a patch? Here's the documentation:

- https://community.kde.org/Get_Involved/development
- https://community.kde.org/Infrastructure/Phabricator
Comment 3 Nate Graham 2021-09-16 17:48:55 UTC

*** This bug has been marked as a duplicate of bug 427875 ***