From 405469aa19060a20a58c8715861b53849a33c440 Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Thu, 18 Aug 2022 13:46:27 +0200 Subject: [PATCH] options: Set placement default in kcfg This ensures the value can still be overridden explicitly in kwinrc. Signed-off-by: Victoria Fischer --- src/kwin.kcfg | 9 ++++++++- src/options.cpp | 6 ------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/kwin.kcfg b/src/kwin.kcfg index a315b886a5..624b9a27c8 100644 --- a/src/kwin.kcfg +++ b/src/kwin.kcfg @@ -3,6 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0 http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" > + config-kwin.h @@ -124,7 +125,13 @@ - Placement::Centered + [] { + #if KWIN_BUILD_DECORATIONS + return Placement::Centered; + #else + return Placement::Maximizing; + #endif + }() false diff --git a/src/options.cpp b/src/options.cpp index 5a9d4f065f..27555a9c19 100644 --- a/src/options.cpp +++ b/src/options.cpp @@ -761,13 +761,7 @@ void Options::syncFromKcfgc() setFocusStealingPreventionLevel(m_settings->focusStealingPreventionLevel()); setXwaylandCrashPolicy(m_settings->xwaylandCrashPolicy()); setXwaylandMaxCrashCount(m_settings->xwaylandMaxCrashCount()); - -#if KWIN_BUILD_DECORATIONS setPlacement(m_settings->placement()); -#else - setPlacement(Placement::Maximizing); -#endif - setAutoRaise(m_settings->autoRaise()); setAutoRaiseInterval(m_settings->autoRaiseInterval()); setDelayFocusInterval(m_settings->delayFocusInterval());