From a9587dd19df1e6d6108af37c3e42eb2db8a19099 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Tue, 22 Jul 2014 16:08:08 +0200 Subject: [PATCH] Bring back CloseButtonCorner in EffectsHandlerImpl The setting should be per window and all button positions should just get exported. This would be way more precise than checking the default values. --- effects.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/effects.cpp b/effects.cpp index 7d344376ef..88bbf3a2c9 100644 --- a/effects.cpp +++ b/effects.cpp @@ -62,6 +62,7 @@ along with this program. If not, see . #endif #include "decorations/decorationbridge.h" +#include // dbus generated #include "screenlocker_interface.h" @@ -1442,7 +1443,8 @@ QVariant EffectsHandlerImpl::kwinOption(KWinOption kwopt) { switch (kwopt) { case CloseButtonCorner: - return Qt::TopRightCorner; + // TODO: this could become per window and be derived from the actual position in the deco + return KDecoration2::DecorationSettings::self()->decorationButtonsLeft().contains(KDecoration2::DecorationButtonType::Close) ? Qt::TopLeftCorner : Qt::TopRightCorner; #ifdef KWIN_BUILD_SCREENEDGES case SwitchDesktopOnScreenEdge: return ScreenEdges::self()->isDesktopSwitching();