diff --git a/src/effects/backgroundcontrast/contrast.cpp b/src/effects/backgroundcontrast/contrast.cpp index e4cc260f24..ca6c00f10a 100644 --- a/src/effects/backgroundcontrast/contrast.cpp +++ b/src/effects/backgroundcontrast/contrast.cpp @@ -18,6 +18,7 @@ #include #include #include +#include // for ceil() namespace KWin { @@ -381,8 +382,8 @@ void ContrastEffect::drawWindow(EffectWindow *w, int mask, const QRegion ®ion for (QRect r : shape) { r.moveTo(pt.x() + (r.x() - pt.x()) * data.xScale() + data.xTranslation(), pt.y() + (r.y() - pt.y()) * data.yScale() + data.yTranslation()); - r.setWidth(r.width() * data.xScale()); - r.setHeight(r.height() * data.yScale()); + r.setWidth(std::ceil(r.width() * data.xScale())); + r.setHeight(std::ceil(r.height() * data.yScale())); scaledShape |= r; } shape = scaledShape & region;