From a62e53e1b1fdb363fefb74907dca339b238e99b9 Mon Sep 17 00:00:00 2001 From: Nate Graham Date: Tue, 8 Dec 2020 12:01:49 -0700 Subject: Fix windows being inappropriately maximized on launch When a window is closed while maximized, we write a special string to the config file so that it gets restored in its maximized state. But we don't ever delete that thing when the window is un-maximized and closed again, causing the window to always be maximized when launched. BUG: 426813 FIXED-IN: 5.78 --- src/gui/kwindowconfig.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/gui/kwindowconfig.cpp b/src/gui/kwindowconfig.cpp index ddbc89a5..c28ed0ff 100644 --- a/src/gui/kwindowconfig.cpp +++ b/src/gui/kwindowconfig.cpp @@ -58,6 +58,9 @@ void KWindowConfig::saveWindowSize(const QWindow *window, KConfigGroup &config, const QString hString(allScreens + QStringLiteral(" Height %1").arg(desk.height())); config.writeEntry(wString, sizeToSave.width(), options); config.writeEntry(hString, sizeToSave.height(), options); + // Don't keep the maximized string in the file since the window is + // no longer maximized at this point + config.deleteEntry(screenMaximizedString); } } if ((isMaximized == false) && !config.hasDefault(screenMaximizedString)) { -- cgit v1.2.1