Bug 478442

Summary: When window opens in maximized state, de-maximizing it doesn't return it to its pre-maximized geometry
Product: [Applications] plasma-systemmonitor Reporter: Nate Graham <nate>
Component: generalAssignee: KSysGuard Developers <ksysguard-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: ahiemstra, bednarczyk.pawel, bizyaev, bugseforuns, kde, miranda, plasma-bugs, qufiwefefwoyn
Priority: NOR Keywords: qt6, usability, wayland
Version: master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=437089
Latest Commit: Version Fixed In: 6.0

Description Nate Graham 2023-12-12 16:24:17 UTC
Plasma 6 Wayland, everything from git master.

STEPS TO REPRODUCE
1. Be on Wayland
2. Open System Monitor and make sure it's not maximized and doesn't take up the entire screen
3. Maximize it
4. Quit the app
5. Re-open the app; see that it opens in the maximized state, as expected
6. De-maximize the window

OBSERVED RESULT
The window de-maximizes, but its geometry doesn't change at all

EXPECTED RESULT
The window de-maximizes and returns to the geometry it had in step 2.
Comment 1 Pawel 2023-12-16 10:55:18 UTC
can reproduce on beta 1 on Arch Linux.
Comment 2 Bug Janitor Service 2024-02-02 16:04:13 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-systemmonitor/-/merge_requests/255
Comment 3 Arjen Hiemstra 2024-02-08 15:39:35 UTC
Git commit 97e569d16492b6d9cabaa36f5eea8a7faaecfb28 by Arjen Hiemstra.
Committed on 08/02/2024 at 15:32.
Pushed by ahiemstra into branch 'master'.

Only store window geometry if the window is in "Windowed" state

So that we don't read the maximized size and store that in the config,
which means restoring a maximized state would appear to do nothing.

Also ensure the window size is properly set when going from Maximixed to
Windowed.

M  +24   -2    src/Main.qml

https://invent.kde.org/plasma/plasma-systemmonitor/-/commit/97e569d16492b6d9cabaa36f5eea8a7faaecfb28
Comment 4 Arjen Hiemstra 2024-02-08 15:44:56 UTC
Git commit 9040115f609618e28ef6a7d360ca9468bf5a47c2 by Arjen Hiemstra.
Committed on 08/02/2024 at 15:43.
Pushed by ahiemstra into branch 'Plasma/6.0'.

Only store window geometry if the window is in "Windowed" state

So that we don't read the maximized size and store that in the config,
which means restoring a maximized state would appear to do nothing.

Also ensure the window size is properly set when going from Maximixed to
Windowed.

M  +24   -2    src/Main.qml

https://invent.kde.org/plasma/plasma-systemmonitor/-/commit/9040115f609618e28ef6a7d360ca9468bf5a47c2