From 39151f8454d781502d8bf88987122b7956af02e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Thu, 28 Apr 2011 20:02:26 +0200 Subject: [PATCH] Explicitly repaint when thumbnails are requested/removed That looks like it only worked because the thumbnail background was repainted at the same time. Let's make it a little bit more reliable. --- effects/taskbarthumbnail/taskbarthumbnail.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/effects/taskbarthumbnail/taskbarthumbnail.cpp b/effects/taskbarthumbnail/taskbarthumbnail.cpp index 8f0ccc12a6..c1a8cde1c3 100644 --- a/effects/taskbarthumbnail/taskbarthumbnail.cpp +++ b/effects/taskbarthumbnail/taskbarthumbnail.cpp @@ -136,6 +136,9 @@ void TaskbarThumbnailEffect::slotPropertyNotify(EffectWindow* w, long a) { if (!w || a != atom) return; + foreach (const Data & thumb, thumbnails.values(w)) { + effects->addRepaint(thumb.rect); + } thumbnails.remove(w); QByteArray data = w->readProperty(atom, atom, 32); if (data.length() < 1) @@ -156,6 +159,7 @@ void TaskbarThumbnailEffect::slotPropertyNotify(EffectWindow* w, long a) data.window = d[ pos ]; data.rect = QRect(d[ pos + 1 ], d[ pos + 2 ], d[ pos + 3 ], d[ pos + 4 ]); thumbnails.insert(w, data); + effects->addRepaint(data.rect); pos += size; } }