From 18f64bd36deb8a71f41082f43d1a3ebb126d71f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Wed, 4 Jan 2012 18:33:37 +0100 Subject: [PATCH] Use invokeMethod for closeWindow --- effects.cpp | 7 ------- effects.h | 2 -- libkwineffects/kwineffects.cpp | 5 +++++ libkwineffects/kwineffects.h | 2 +- 4 files changed, 6 insertions(+), 10 deletions(-) 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;