Bug 494377 - System Settings is no longer consistently remembering/restoring window geometry
Summary: System Settings is no longer consistently remembering/restoring window geometry
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: general (show other bugs)
Version: 6.2.0
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2024-10-09 21:45 UTC by Bill Crawford
Modified: 2024-10-21 18:20 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: Plasma 6.2.2 with Frameworks 6.8
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bill Crawford 2024-10-09 21:45:15 UTC
SUMMARY
System Settings is no longer remembering window size and position

STEPS TO REPRODUCE
1. open System Settings
2. ...
3. ...

OBSERVED RESULT
It used to open with the same geometry as when I closed it (at least the size) but now is opening the same size, and definitely not the same position.

EXPECTED RESULT
Opening the same size as when I closed it.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 6.2

ADDITIONAL INFORMATION
This is quite irritating as many of the settings pages are hard to use without making the window considerably larger.
Comment 1 Nate Graham 2024-10-10 21:09:43 UTC
Yeah, we tried to improve this in Plasma 6.2, but I think unfortunately we might have made it worse instead. I can intermittently reproduce that window sizes don't get saved consistently now. Sometimes they do, but sometimes they don't. Akseli, can you take a look at this?
Comment 2 Akseli Lahtinen 2024-10-11 09:15:15 UTC
Looks like the system settings, when it is resized to the absolute minimum size, ignores saving the state completely.
Comment 3 Akseli Lahtinen 2024-10-11 11:10:55 UTC
Found the reason:

When window is set to its absolute minimum size, its seen as the window default size and kwindowconfig ignores saving the default size.
Comment 4 Bug Janitor Service 2024-10-11 11:32:38 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/systemsettings/-/merge_requests/335
Comment 5 Bug Janitor Service 2024-10-18 12:13:46 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kconfig/-/merge_requests/335
Comment 6 Akseli Lahtinen 2024-10-21 18:08:44 UTC
Git commit 65db9ccc4bc8e3fbb10f1694391141287bd253ef by Akseli Lahtinen.
Committed on 21/10/2024 at 18:08.
Pushed by akselmo into branch 'master'.

kwindowconfig: If sizes are same as default, revert them to default when saving

This is most noticeable with system settings:

If system settings size is saved and its the same as the default size
for it, the code does nothing and leaves the old size state.

This makes sure that when we have same size as the default, we
also revert them to default.

See also for more context: https://invent.kde.org/plasma/systemsettings/-/merge_requests/335#note_1055385

M  +6    -1    src/gui/kwindowconfig.cpp

https://invent.kde.org/frameworks/kconfig/-/commit/65db9ccc4bc8e3fbb10f1694391141287bd253ef
Comment 7 Akseli Lahtinen 2024-10-21 18:12:22 UTC
Git commit f3b32ad08b1e5685fcd2d70dba04c5a621872e1e by Akseli Lahtinen.
Committed on 11/10/2024 at 11:31.
Pushed by akselmo into branch 'master'.

SettingsBase: Make sure we save window state on quit or geometryChange

This change makes sure we save the window state settings when:
- Screen geometry changes, such as moving between two different screens
- When application is closed

M  +2    -0    app/SettingsBase.cpp

https://invent.kde.org/plasma/systemsettings/-/commit/f3b32ad08b1e5685fcd2d70dba04c5a621872e1e
Comment 8 Akseli Lahtinen 2024-10-21 18:15:55 UTC
Git commit 4bd4bce4b834840772d91e643c4ddd3d633c636c by Akseli Lahtinen.
Committed on 21/10/2024 at 18:14.
Pushed by akselmo into branch 'Plasma/6.2'.

SettingsBase: Make sure we save window state on quit or geometryChange

This change makes sure we save the window state settings when:
- Screen geometry changes, such as moving between two different screens
- When application is closed


(cherry picked from commit f3b32ad08b1e5685fcd2d70dba04c5a621872e1e)

f3b32ad0 SettingsBase: Make sure we save window state on quit or geometryChange

Co-authored-by: Akseli Lahtinen <akselmo@akselmo.dev>

M  +2    -0    app/SettingsBase.cpp

https://invent.kde.org/plasma/systemsettings/-/commit/4bd4bce4b834840772d91e643c4ddd3d633c636c