diff --git a/effects.cpp b/effects.cpp index 5c6272c602..b6eba83cc0 100644 --- a/effects.cpp +++ b/effects.cpp @@ -1496,6 +1496,10 @@ QVariant EffectsHandlerImpl::kwinOption(KWinOption kwopt) switch (kwopt) { case CloseButtonCorner: return Workspace::self()->decorationCloseButtonCorner(); + case SwitchDesktopOnScreenEdge: + return ScreenEdges::self()->isDesktopSwitching(); + case SwitchDesktopOnScreenEdgeMovingWindows: + return ScreenEdges::self()->isDesktopSwitchingMovingClients(); } return QVariant(); // an invalid one } diff --git a/effects/cube/cubeslide.cpp b/effects/cube/cubeslide.cpp index aa933ae971..f0459058bf 100644 --- a/effects/cube/cubeslide.cpp +++ b/effects/cube/cubeslide.cpp @@ -519,6 +519,8 @@ void CubeSlideEffect::slotWindowStepUserMovedResized(EffectWindow* w) { if (!useWindowMoving) return; + if (!effects->kwinOption(SwitchDesktopOnScreenEdgeMovingWindows).toBool()) + return; if (w->isUserResize()) return; const QPoint cursor = effects->cursorPos(); @@ -556,6 +558,8 @@ void CubeSlideEffect::slotWindowFinishUserMovedResized(EffectWindow* w) { if (!useWindowMoving) return; + if (!effects->kwinOption(SwitchDesktopOnScreenEdgeMovingWindows).toBool()) + return; if (w->isUserResize()) return; if (!desktopChangedWhileMoving) { diff --git a/libkwineffects/kwinglobals.h b/libkwineffects/kwinglobals.h index a8cd692bd3..b1894e59ba 100644 --- a/libkwineffects/kwinglobals.h +++ b/libkwineffects/kwinglobals.h @@ -124,7 +124,9 @@ enum TabBoxMode { }; enum KWinOption { - CloseButtonCorner + CloseButtonCorner, + SwitchDesktopOnScreenEdge, + SwitchDesktopOnScreenEdgeMovingWindows }; inline