diff --git a/effects/wobblywindows/wobblywindows.h b/effects/wobblywindows/wobblywindows.h --- a/effects/wobblywindows/wobblywindows.h +++ b/effects/wobblywindows/wobblywindows.h @@ -54,7 +54,10 @@ virtual bool isActive() const; int requestedEffectChainPosition() const override { - return 45; + // Please notice that the Wobbly Windows effect has to be placed + // after the Maximize effect in the effect chain, otherwise there + // can be visual artifacts when dragging maximized windows.:wq + return 70; } // Wobbly model parameters diff --git a/effects/wobblywindows/wobblywindows.cpp b/effects/wobblywindows/wobblywindows.cpp --- a/effects/wobblywindows/wobblywindows.cpp +++ b/effects/wobblywindows/wobblywindows.cpp @@ -326,8 +326,14 @@ right = qMax(right, data.quads[i].right()); bottom = qMax(bottom, data.quads[i].bottom()); } - m_updateRegion = m_updateRegion.united(QRect(w->x() + left, w->y() + top, - right - left + 2, bottom - top + 2)); + QRectF dirtyRect( + left * data.xScale() + w->x() + data.xTranslation(), + top * data.yScale() + w->y() + data.yTranslation(), + (right - left + 1.0) * data.xScale(), + (bottom - top + 1.0) * data.yScale()); + // Expand the dirty region by 1px to fix potential round/floor issues. + dirtyRect.adjust(-1.0, -1.0, 1.0, 1.0); + m_updateRegion = m_updateRegion.united(dirtyRect.toRect()); } // Call the next effect.