diff --git a/effects.cpp b/effects.cpp index 0650182868..633e2b07d5 100644 --- a/effects.cpp +++ b/effects.cpp @@ -1465,13 +1465,6 @@ WindowQuadList EffectWindowImpl::buildQuads(bool force) const return sceneWindow()->buildQuads(force); } -void EffectWindowImpl::closeWindow() const -{ - if (Client* c = dynamic_cast< Client* >(toplevel)) { - c->closeWindow(); - } -} - bool EffectWindowImpl::visibleInClientGroup() const { if (Client* c = dynamic_cast< Client* >(toplevel)) { diff --git a/effects.h b/effects.h index 3b518bc371..0d63c245a6 100644 --- a/effects.h +++ b/effects.h @@ -256,8 +256,6 @@ public: virtual WindowQuadList buildQuads(bool force = false) const; - virtual void closeWindow() const; - virtual bool visibleInClientGroup() const; const Toplevel* window() const; diff --git a/libkwineffects/kwineffects.cpp b/libkwineffects/kwineffects.cpp index 51a7995eb8..ca692edbb2 100644 --- a/libkwineffects/kwineffects.cpp +++ b/libkwineffects/kwineffects.cpp @@ -394,6 +394,11 @@ WINDOW_HELPER_SETTER(unminimize, "minimized",,false) #undef WINDOW_HELPER_SETTER +void EffectWindow::closeWindow() const +{ + QMetaObject::invokeMethod(parent(), "closeWindow"); +} + bool EffectWindow::isOnCurrentActivity() const { return isOnActivity(effects->currentActivity()); diff --git a/libkwineffects/kwineffects.h b/libkwineffects/kwineffects.h index 427ab08bb9..45e759e84b 100644 --- a/libkwineffects/kwineffects.h +++ b/libkwineffects/kwineffects.h @@ -1271,7 +1271,7 @@ public: void minimize(); void unminimize(); - virtual void closeWindow() const = 0; + void closeWindow() const; virtual bool visibleInClientGroup() const = 0;