Bug 324957 - KMainWindow: size / position restoring is utterly broken
Summary: KMainWindow: size / position restoring is utterly broken
Status: RESOLVED WORKSFORME
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: kdeui (show other bugs)
Version: 4.11.1
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL: https://git.reviewboard.kde.org/r/114...
Keywords:
: 346396 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-09-16 12:04 UTC by Kai Uwe Broulik
Modified: 2022-11-16 05:16 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kai Uwe Broulik 2013-09-16 12:04:38 UTC
I have two monitors with different resolution (1680x1050 and 1280x1024). I usually use Dolphin on maximized on my secondary monitor. When I close Dolphin and open it again, it opens on the secondary monitor, not maximized but with the size of the primary one.
Reproducible with Dolphin and Konsole. Kate opens maximized properly. Systemsettings never opens maximized but with the last size it had before maximizing. (So, is this application specific?)

Reproducible: Always

Steps to Reproduce:
1. Have the above screen configuration :)
2. Open Dolphin
3. Move Dolphin to the secondary monitor and maximize it
4. Close Dolphin
5. Open Dolphin again
Actual Results:  
Dolphin opens on the secondary monitor, not maximized, with the size of the primary monitor

Expected Results:  
Dolphin opens on the secondary monitor, (maximized), with the size of the secondary monitor.
Comment 1 Thomas Lübking 2013-09-16 13:37:24 UTC
The application reads the last size from its rc, according to the screensize of the screen where it assumes to show up (being the first since this hapens before its mapped/placed... i think the entire KMainWindow thing can only deal with changing screen sizes) and kwin places it on the active screen (screen with active window or where the mouse is - configurable)

Overmore KMainWindow does not store the window state (maximized or not) but simply "screensize + 1,1 - the WM will hopefully be so kind to turn this into maximization"

See bug #51571, bug #191072 and bug #150772

Things that need to happen for KF/5
a) KMainWindow needs to properly re/store former states - not abuse the size. That worked on static single screen setups 10 years ago.
b) KMainWindow has to restore the former size _after_ being mapped by a maprequest (risking onscreen flicker)
c) alternatively KMainWindow *might* re/store the previous screen (causing a bypass of the "active screen" selection)

---------------

To workaround the issue, use a kwin rule.
Make dolphin initially appear on screen 2 and have it maximized.
Comment 2 Thomas Lübking 2015-04-20 14:35:19 UTC
*** Bug 346396 has been marked as a duplicate of this bug. ***
Comment 3 Justin Zobel 2022-10-17 00:41:12 UTC
Thank you for reporting this bug in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "CONFIRMED" when replying. Thank you!
Comment 4 Bug Janitor Service 2022-11-01 05:04:46 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 5 Bug Janitor Service 2022-11-16 05:16:14 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!