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.
Details
- Reviewers
romangg - Group Reviewers
Plasma - Commits
- R108:c3c030d8b595: Fix creation of kdeglobals if /etc/xdg/kdeglobals present
Cleared ~ and logged in again, title bar color is now correct.
Diff Detail
- Repository
- R108 KWin
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
So if XDG_CONFIG_DIRS contains additional locations, this will not work?
e.g. in Kubuntu we set up: XDG_CONFIG_DIRS="$XDG_CONFIG_DIRS:/usr/share/kubuntu-default-settings/kf5-settings"
Basically doing
!m_colorScheme.startsWith(QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation))
instead might work, but maybe there are cases with more than once writable location?
The failure mode would be better though, writing to kdeglobals even if not necessary, compared to not creating kdeglobals at all.
Not as far as QSP is concerned and that's all that matters here I think. QStandardPaths::locate can return any of XDG_CONFIG_{DIRS,HOME} QStandardPaths::writableLocation only returns _HOME. So as far as QSP and KConfig are concerned there is only one writable location.