https://bugs.kde.org/show_bug.cgi?id=492229
--- Comment #2 from Eamonn Rea <eamonn...@protonmail.com> --- Could this be because Discover stores window geometry and not width, height, and maxmized flags separately as other KDE applications appear to do? For example, `systemmonitorrc` stores window information like this (removed some irrelevant information): ``` [General] height=984 maximized=true width=1866 ``` Note that the "maximized" flag is not present for System Monitor if the application is not windowed, at least in my observations. The "width" and "height" flags do not update. Whereas Discover stores the window's geometry, and this lines up with observations in the code. For example it seems Discover loads the window geometry based on the information in this "geometry" key (https://invent.kde.org/plasma/discover/-/blob/e958c9c1afcf79f09409505ebbf786d5cfc2fe7a/discover/DiscoverObject.cpp#L521), which doesn't contain minimized/maximised information. My understanding in Qt is that you can set the maximised window flag independent of the window geometry, so in theory you could set window geometry while a window is maximised, and once it is not maximised, it will then assume the size and position assigned. ``` [Window] geometry=0,1080,2560,1377 visibility=4 ``` I cannot actually see where in this file that Discover stores whether it was maximised or not, so perhaps this is managed separately. Other applications store window information differently, for example Spectacle (which is generally just a dialog) stores its information differently to Discover and System Monitor. It's also possible I'm looking in the wrong place, as System Settings remembers its window geometry (although not whether it was maximised or not) but it does not seem to store a config rc file in `~/.config`. Similarly, Dolphin stores a dolphinrc file, but it does not seem to get updated and has some window positioning weirdness when unmaximised (which I am planning to file as a separate but.) If this is indeed the cause of the bug, then I guess Discover would need to change how it stores its geometry information. Maybe it shouldn't update the saved geometry if it is closed while maximised? It seems to already be able to know when it was closed while maximised, and I would guess the Discover `window` object should be able to tell when it is maximised. If that would be the fix, I guess it would go somewhere here, when the application checks for a close event: https://invent.kde.org/plasma/discover/-/blob/e958c9c1afcf79f09409505ebbf786d5cfc2fe7a/discover/DiscoverObject.cpp#L550-562 -- You are receiving this mail because: You are watching all bug changes.