aboutsummaryrefslogtreecommitdiff
path: root/src/gui/kwindowconfig.cpp
diff options
context:
space:
mode:
authorNate Graham <nate@kde.org>2020-12-08 12:01:49 -0700
committerNate Graham <nate@kde.org>2020-12-09 18:23:27 +0000
commita62e53e1b1fdb363fefb74907dca339b238e99b9 (patch)
treebfd4a65ccdfd73cd9773288cd191ba162128bef4 /src/gui/kwindowconfig.cpp
parent1be7af75767d579133e71f70f4629ac9c1e027fd (diff)
downloadkconfig-a62e53e1b1fdb363fefb74907dca339b238e99b9.tar.gz
kconfig-a62e53e1b1fdb363fefb74907dca339b238e99b9.tar.bz2
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
Diffstat (limited to 'src/gui/kwindowconfig.cpp')
-rw-r--r--src/gui/kwindowconfig.cpp3
1 files changed, 3 insertions, 0 deletions
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)) {