Commit af12bc60 authored by Martin Flöser's avatar Martin Flöser
Browse files

Only start animating in cube slide on window move if core uses switch desktop on edge

For this new KWinOptions are exposed to query whether core uses switch on
desktop on move or always.

BUG: 299901
FIXED-IN: 4.11
REVIEW: 108671
parent 8e007646
......@@ -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
}
......
......@@ -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) {
......
......@@ -124,7 +124,9 @@ enum TabBoxMode {
};
enum KWinOption {
CloseButtonCorner
CloseButtonCorner,
SwitchDesktopOnScreenEdge,
SwitchDesktopOnScreenEdgeMovingWindows
};
inline
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment