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
This commit is contained in:
parent
e654c9d106
commit
524a63b3fe
2 changed files with 10 additions and 1 deletions
|
@ -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);
|
||||
data.multiplyOpacity(opacity);
|
||||
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:
|
|||
ThumbnailAsideEffect();
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue