Commit 27172bbc authored by Martin Flöser's avatar Martin Flöser
Browse files

Track painted areas in Thumbnail Aside effect

Following the approach of ShowPaint effect by tracking the actual painted
regions per window to determine whether the painted area intersects with
one of the thumbnails.

BUG: 306169
FIXED-IN: 4.10
REVIEW: 108289
parent e448aeb4
......@@ -57,9 +57,10 @@ void ThumbnailAsideEffect::reconfigure(ReconfigureFlags)
void ThumbnailAsideEffect::paintScreen(int mask, QRegion region, ScreenPaintData& data)
painted = QRegion();
effects->paintScreen(mask, region, data);
foreach (const Data & d, windows) {
if (region.contains(d.rect)) {
if (painted.intersects(d.rect)) {
WindowPaintData data(d.window);
QRect region;
......@@ -70,6 +71,12 @@ void ThumbnailAsideEffect::paintScreen(int mask, QRegion region, ScreenPaintData
void ThumbnailAsideEffect::paintWindow(EffectWindow *w, int mask, QRegion region, WindowPaintData &data)
effects->paintWindow(w, mask, region, data);
painted |= region;
void ThumbnailAsideEffect::slotWindowDamaged(EffectWindow* w, const QRect&)
foreach (const Data & d, windows) {
......@@ -47,6 +47,7 @@ public:
virtual void reconfigure(ReconfigureFlags);
virtual void paintScreen(int mask, QRegion region, ScreenPaintData& data);
virtual void paintWindow(EffectWindow *w, int mask, QRegion region, WindowPaintData &data);
// for properties
int configuredMaxWidth() const {
......@@ -82,6 +83,7 @@ private:
int spacing;
double opacity;
int screen;
QRegion painted;
} // namespace
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment