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
This commit is contained in:
parent
97943019db
commit
beb00478e1
3 changed files with 11 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue