Commit 97accd14 authored by Nate Graham's avatar Nate Graham
Browse files

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
parent 073f3cb9
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment