aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNate Graham <nate@kde.org>2021-02-08 11:53:28 -0700
committerNate Graham <nate@kde.org>2021-02-08 11:53:28 -0700
commit97accd14d732f3eda1c25bb58290cb9311040798 (patch)
tree01012e137c21e528e50e0a149af18a46a21070cc /src
parent073f3cb9f414fa91b21057e808eed6c34319e922 (diff)
downloadkconfig-97accd14d732f3eda1c25bb58290cb9311040798.tar.gz
kconfig-97accd14d732f3eda1c25bb58290cb9311040798.tar.bz2
Fix window positioning regression due to incorrect fallback in fallback
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
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);