diff --git a/src/effects.cpp b/src/effects.cpp index 3de674775e..c2e43f1af3 100644 --- a/src/effects.cpp +++ b/src/effects.cpp @@ -715,15 +715,6 @@ void EffectsHandlerImpl::moveWindow(EffectWindow *w, const QPoint &pos, bool sna } } -void EffectsHandlerImpl::windowToDesktop(EffectWindow *w, int desktop) -{ - QList desktopIds; - if (desktop != -1) { - desktopIds.append(desktop); - } - windowToDesktops(w, desktopIds); -} - void EffectsHandlerImpl::windowToDesktops(EffectWindow *w, const QList &desktopIds) { auto window = static_cast(w)->window(); diff --git a/src/effects.h b/src/effects.h index e2ddf160ec..5c315794f9 100644 --- a/src/effects.h +++ b/src/effects.h @@ -64,7 +64,6 @@ public: void activateWindow(EffectWindow *c) override; EffectWindow *activeWindow() const override; void moveWindow(EffectWindow *w, const QPoint &pos, bool snap = false, double snapAdjust = 1.0) override; - void windowToDesktop(EffectWindow *w, int desktop) override; void windowToScreen(EffectWindow *w, Output *screen) override; void setShowingDesktop(bool showing) override; diff --git a/src/libkwineffects/kwineffects.h b/src/libkwineffects/kwineffects.h index 0eafdbc099..bb69aad355 100644 --- a/src/libkwineffects/kwineffects.h +++ b/src/libkwineffects/kwineffects.h @@ -967,12 +967,6 @@ public: virtual KWin::EffectWindow *activeWindow() const = 0; Q_SCRIPTABLE virtual void moveWindow(KWin::EffectWindow *w, const QPoint &pos, bool snap = false, double snapAdjust = 1.0) = 0; - /** - * Moves the window to the specific desktop - * Setting desktop to NET::OnAllDesktops will set the window on all desktops - */ - Q_SCRIPTABLE virtual void windowToDesktop(KWin::EffectWindow *w, int desktop) = 0; - /** * Moves a window to the given desktops * On X11, the window will end up on the last window in the list diff --git a/src/plugins/overview/overvieweffect.cpp b/src/plugins/overview/overvieweffect.cpp index cfff22ea1b..33fc0df2d5 100644 --- a/src/plugins/overview/overvieweffect.cpp +++ b/src/plugins/overview/overvieweffect.cpp @@ -362,7 +362,7 @@ void OverviewEffect::grabbedKeyboardEvent(QKeyEvent *keyEvent) QuickSceneEffect::grabbedKeyboardEvent(keyEvent); } -void OverviewEffect::swapDesktops(int from, int to) +void OverviewEffect::swapDesktops(uint from, uint to) { QList fromList; QList toList; @@ -377,10 +377,10 @@ void OverviewEffect::swapDesktops(int from, int to) } } for (auto *w : fromList) { - effects->windowToDesktop(w, to); + effects->windowToDesktops(w, {to}); } for (auto *w : toList) { - effects->windowToDesktop(w, from); + effects->windowToDesktops(w, {from}); } } diff --git a/src/plugins/overview/overvieweffect.h b/src/plugins/overview/overvieweffect.h index a361299ae8..176003e8b9 100644 --- a/src/plugins/overview/overvieweffect.h +++ b/src/plugins/overview/overvieweffect.h @@ -59,7 +59,7 @@ public: void reconfigure(ReconfigureFlags flags) override; void grabbedKeyboardEvent(QKeyEvent *keyEvent) override; - Q_INVOKABLE void swapDesktops(int from, int to); + Q_INVOKABLE void swapDesktops(uint from, uint to); Q_SIGNALS: void animationDurationChanged();