From c3c030d8b5953e4f2181e45fdc399ea786ac9352 Mon Sep 17 00:00:00 2001 From: Fabian Vogt Date: Wed, 3 Jul 2019 14:01:07 +0200 Subject: [PATCH] Fix creation of kdeglobals if /etc/xdg/kdeglobals present Summary: If /etc/xdg/kdeglobals exists but ~/.config/kdeglobals does not (like on the first start of kwin_wayland), it did not notice changes to kdeglobals. This lead to KWin using the wrong color scheme for the window decoration on the first login, which also could not be changed without a session restart. Test Plan: Cleared ~ and logged in again, title bar color is now correct. Reviewers: #plasma, romangg Reviewed By: #plasma, romangg Subscribers: sitter, broulik, rikmills, kwin, plasma-devel Tags: #kwin Differential Revision: https://phabricator.kde.org/D22238 --- decorations/decorationpalette.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/decorations/decorationpalette.cpp b/decorations/decorationpalette.cpp index e37eeaf88f..f7036d6be8 100644 --- a/decorations/decorationpalette.cpp +++ b/decorations/decorationpalette.cpp @@ -41,7 +41,7 @@ DecorationPalette::DecorationPalette(const QString &colorScheme) ? colorScheme : QStandardPaths::locate(QStandardPaths::GenericConfigLocation, colorScheme)) { - if (m_colorScheme.isEmpty() && colorScheme == QStringLiteral("kdeglobals")) { + if (!m_colorScheme.startsWith(QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation)) && colorScheme == QStringLiteral("kdeglobals")) { // kdeglobals doesn't exist so create it. This is needed to monitor it using QFileSystemWatcher. auto config = KSharedConfig::openConfig(colorScheme, KConfig::SimpleConfig); KConfigGroup wmConfig(config, QStringLiteral("WM"));