slide effect: remove redundant code
This commit is contained in:
parent
77091f7fcb
commit
c544d4f297
2 changed files with 6 additions and 24 deletions
|
@ -32,16 +32,14 @@ SlideEffect::SlideEffect()
|
|||
connect(effects, &EffectsHandler::windowDeleted,
|
||||
this, &SlideEffect::windowDeleted);
|
||||
connect(effects, &EffectsHandler::numberDesktopsChanged,
|
||||
this, &SlideEffect::numberDesktopsChanged);
|
||||
this, &SlideEffect::stop);
|
||||
connect(effects, &EffectsHandler::numberScreensChanged,
|
||||
this, &SlideEffect::numberScreensChanged);
|
||||
this, &SlideEffect::stop);
|
||||
}
|
||||
|
||||
SlideEffect::~SlideEffect()
|
||||
{
|
||||
if (m_active) {
|
||||
stop();
|
||||
}
|
||||
stop();
|
||||
}
|
||||
|
||||
bool SlideEffect::supported()
|
||||
|
@ -384,6 +382,9 @@ void SlideEffect::start(int old, int current, EffectWindow *movingWindow)
|
|||
|
||||
void SlideEffect::stop()
|
||||
{
|
||||
if (!m_active) {
|
||||
return;
|
||||
}
|
||||
const EffectWindowList windows = effects->stackingOrder();
|
||||
for (EffectWindow *w : windows) {
|
||||
w->setData(WindowForceBackgroundContrastRole, QVariant());
|
||||
|
@ -435,20 +436,4 @@ void SlideEffect::windowDeleted(EffectWindow *w)
|
|||
m_paintCtx.fullscreenWindows.removeAll(w);
|
||||
}
|
||||
|
||||
void SlideEffect::numberDesktopsChanged(uint)
|
||||
{
|
||||
if (!m_active) {
|
||||
return;
|
||||
}
|
||||
stop();
|
||||
}
|
||||
|
||||
void SlideEffect::numberScreensChanged()
|
||||
{
|
||||
if (!m_active) {
|
||||
return;
|
||||
}
|
||||
stop();
|
||||
}
|
||||
|
||||
} // namespace KWin
|
||||
|
|
|
@ -61,9 +61,6 @@ private Q_SLOTS:
|
|||
void windowAdded(EffectWindow *w);
|
||||
void windowDeleted(EffectWindow *w);
|
||||
|
||||
void numberDesktopsChanged(uint old);
|
||||
void numberScreensChanged();
|
||||
|
||||
private:
|
||||
QPoint desktopCoords(int id) const;
|
||||
QRect desktopGeometry(int id) const;
|
||||
|
|
Loading…
Reference in a new issue