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.
This commit is contained in:
Martin Gräßlin 2011-04-28 20:02:26 +02:00
parent e25913cafb
commit 39151f8454

View file

@ -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;
}
}