diff --git a/thumbnailitem.cpp b/thumbnailitem.cpp index f19540591d..b402b3244b 100644 --- a/thumbnailitem.cpp +++ b/thumbnailitem.cpp @@ -41,6 +41,7 @@ ThumbnailItem::ThumbnailItem(QDeclarativeItem* parent) setFlags(flags() & ~QGraphicsItem::ItemHasNoContents); if (effects) { connect(effects, SIGNAL(windowAdded(KWin::EffectWindow*)), SLOT(effectWindowAdded())); + connect(effects, SIGNAL(windowDamaged(KWin::EffectWindow*,QRect)), SLOT(repaint(KWin::EffectWindow*))); } QTimer::singleShot(0, this, SLOT(init())); } @@ -117,4 +118,11 @@ void ThumbnailItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *opt pixmap); } +void ThumbnailItem::repaint(KWin::EffectWindow *w) +{ + if (static_cast(w)->window()->window() == m_wId) { + update(); + } +} + } // namespace KWin diff --git a/thumbnailitem.h b/thumbnailitem.h index 8d39f5fc26..e50c973539 100644 --- a/thumbnailitem.h +++ b/thumbnailitem.h @@ -54,6 +54,7 @@ Q_SIGNALS: private Q_SLOTS: void init(); void effectWindowAdded(); + void repaint(KWin::EffectWindow* w); private: void findParentEffectWindow(); qulonglong m_wId;