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();