From 309a77eedfedea5881f8891ccd70c498138c2111 Mon Sep 17 00:00:00 2001 From: Vlad Zagorodniy Date: Thu, 17 May 2018 02:51:50 -0700 Subject: [PATCH] [effects/backgroundcontrast] Calculate correct y-coord of the copy rect Summary: For more details, see D12452. Reviewers: #kwin, davidedmundson, fredrik, mart Reviewed By: #kwin, davidedmundson, mart Subscribers: romangg, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D12466 --- effects/backgroundcontrast/contrast.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/effects/backgroundcontrast/contrast.cpp b/effects/backgroundcontrast/contrast.cpp index f920fcd88a..3705a64d13 100644 --- a/effects/backgroundcontrast/contrast.cpp +++ b/effects/backgroundcontrast/contrast.cpp @@ -450,7 +450,7 @@ void ContrastEffect::doContrast(EffectWindow *w, const QRegion& shape, const QRe scratch.bind(); const QRect sg = GLRenderTarget::virtualScreenGeometry(); - glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, (r.x() - sg.x()) * scale, (sg.height() - sg.y() - r.y() - r.height()) * scale, + glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, (r.x() - sg.x()) * scale, (sg.height() - (r.y() - sg.y() + r.height())) * scale, scratch.width(), scratch.height()); // Draw the texture on the offscreen framebuffer object, while blurring it horizontally