Bug 522205 - WindowStateSaver QML object doesn't remember maximized state anymore
Summary: WindowStateSaver QML object doesn't remember maximized state anymore
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kconfig
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: 6.27.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Matthew Dawson
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2026-06-26 07:34 UTC by John Veness
Modified: 2026-07-23 19:21 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.29
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Veness 2026-06-26 07:34:12 UTC
DESCRIPTION
Discover doesn't appear to remember its maximized state between quitting it and restarting it. This happens in both X11 and Wayland, although the behavior is slightly different.

STEPS TO REPRODUCE
1. Run Discover
2. Resize it to a small-ish floating window if it isn't already
3. Maximize it
4. Quit Discover
5. Run Discover

OBSERVED RESULT
In X11:
Discover opens not in maximized state, but instead at its previous small-ish floating window state.

In Wayland:
Discover opens not in maximized state, but instead as a floating window that happens to fit the full screen.

EXPECTED RESULT
Discover opens maximized.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20260623
KDE Plasma Version: 6.7.0
KDE Frameworks Version: 6.27.0
Qt Version: 6.11.1
Kernel Version: 7.1.0-13546-gab9de95c9cf9-1.g694cc3a-vanilla (64-bit)
Comment 1 Nate Graham 2026-06-26 17:53:00 UTC
Can reproduce. This totally used to work.
Comment 2 John Veness 2026-07-13 22:37:56 UTC
System Monitor and KDE Connect are showing the same issue, and according to https://invent.kde.org/frameworks/kconfig/-/work_items/12 they are among apps (along with Discover) that moved to KConfig.WindowStateSaver in their QML to store their window states. So the problem likely lies there rather than in something app-specific.
Comment 3 Nate Graham 2026-07-14 05:09:47 UTC
That's my preliminary conclusion as well. I need to block out some time to dig into it.
Comment 4 Nate Graham 2026-07-14 05:14:56 UTC
git bisect says it was this:

commit 9c204933c6438395d8a34f61c69c932c4b94ff5b (origin/work/apol/do-not-accidentally-show)
Author: Aleix Pol <aleixpol@kde.org>
Date:   Mon May 25 01:34:11 2026 +0200

    kwindowstatesaverquick: Do not force-show windows
    
    If the application decided to not show the window just yet (e.g.
    Discover does that when running on headless updates mode), do not follow
    the maximized state.
    Otherwise we are overriding the app's decision not to show.

 src/qml/kwindowstatesaverquick.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 5 Nate Graham 2026-07-14 05:16:30 UTC
That said, the above commit only added an additional source of brokenness to the already semi-broken behavior; before that, the maximized state was remembered across app launches, but un-maximizing didn't shrink the window to the smaller size it had before being maximized. Both issues should be fixed.
Comment 6 Bug Janitor Service 2026-07-21 23:04:39 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kconfig/-/merge_requests/473
Comment 7 Nate Graham 2026-07-23 19:21:34 UTC
Git commit 31dd5c79f40af792387ee6ecfb613d2aa8055a67 by Nate Graham.
Committed on 23/07/2026 at 13:42.
Pushed by ngraham into branch 'master'.

Revert "kwindowstatesaverquick: Do not force-show windows"

This reverts commit 9c204933c6438395d8a34f61c69c932c4b94ff5b.

Unfortunately, it broke the "remember window maximization" feature.
Apparently the "oddities in QtQuick window visibility handling"
mentioned in the comment are still present.
FIXED-IN: 6.29

M  +1    -1    src/qml/kwindowstatesaverquick.cpp

https://invent.kde.org/frameworks/kconfig/-/commit/31dd5c79f40af792387ee6ecfb613d2aa8055a67