aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNate Graham <nate@kde.org>2021-02-08 11:53:28 -0700
committerl10n daemon script <scripty@kde.org>2021-02-10 08:32:56 +0000
commitaa1b1b35acefb55e36a39cf045098405b1238ef2 (patch)
tree717d29c8162506fcd85e72e1cfdf374d57ca38b6 /src
parent889792ea6f8d6793a65d7c76119afe2083060ab7 (diff)
downloadkconfig-5.79.0-rc3.tar.gz
kconfig-5.79.0-rc3.tar.bz2
Fix window positioning regression due to incorrect fallback in fallbackv5.79.0-rc3v5.79.0
We have a fallback string that gets searched for in the KCM, but that fallback itself should not have a fallback, or else we always use that second fallback and the window gets positioned incorrectly the first time it's opened. So let's replace the second fallback with -1. BUG: 432661 FIXED-IN: 5.79 (cherry picked from commit 97accd14d732f3eda1c25bb58290cb9311040798)
Diffstat (limited to 'src')
-rw-r--r--src/gui/kwindowconfig.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/kwindowconfig.cpp b/src/gui/kwindowconfig.cpp
index 7a47b17a..4f3ac73a 100644
--- a/src/gui/kwindowconfig.cpp
+++ b/src/gui/kwindowconfig.cpp
@@ -168,8 +168,8 @@ void KWindowConfig::restoreWindowPosition(QWindow *window, const KConfigGroup &c
// per-resolution information is not
// TODO: Remove in KF6 or maybe even KF5.85 or something. It really only needs
// to be here to transition existing users once they upgrade from 5.78 -> 5.79
- const int fallbackXPosition = config.readEntry(QStringLiteral("%1 XPosition %2").arg(allConnectedScreens()).arg(desk.width()), window->size().width());
- const int fallbackYPosition = config.readEntry(QStringLiteral("%1 YPosition %2").arg(allConnectedScreens()).arg(desk.height()), window->size().height());
+ const int fallbackXPosition = config.readEntry(QStringLiteral("%1 XPosition %2").arg(allConnectedScreens()).arg(desk.width()), -1);
+ const int fallbackYPosition = config.readEntry(QStringLiteral("%1 YPosition %2").arg(allConnectedScreens()).arg(desk.height()), -1);
const int xPos = config.readEntry(windowXPositionString(desk), fallbackXPosition);
const int yPos = config.readEntry(windowYPositionString(desk), fallbackYPosition);