aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Lübking <thomas.luebking@gmail.com>2013-01-07 20:16:38 (GMT)
committerThomas Lübking <thomas.luebking@gmail.com>2013-01-23 20:27:45 (GMT)
commit2c8b25c7060dc55634018b2b0115218872ab92fa (patch)
tree72a06d3e09d5e2b0f428a0007d943d99da8b0399
parentcda0dc1ce81ca432a05e8cdfe229cc4de18d442f (diff)
reset generic shader after zoom
REVIEW: 108252 BUG: 304435
-rw-r--r--kwin/effects/zoom/zoom.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/kwin/effects/zoom/zoom.cpp b/kwin/effects/zoom/zoom.cpp
index 9d9444a..88a5e1d 100644
--- a/kwin/effects/zoom/zoom.cpp
+++ b/kwin/effects/zoom/zoom.cpp
@@ -227,7 +227,9 @@ void ZoomEffect::reconfigure(ReconfigureFlags)
void ZoomEffect::prePaintScreen(ScreenPrePaintData& data, int time)
{
+ bool altered = false;
if (zoom != target_zoom) {
+ altered = true;
double diff = time / animationTime(500.0);
if (target_zoom > zoom)
zoom = qMin(zoom * qMax(1 + diff, 1.2), target_zoom);
@@ -237,6 +239,8 @@ void ZoomEffect::prePaintScreen(ScreenPrePaintData& data, int time)
if (zoom == 1.0) {
showCursor();
+ if (altered) // reset the generic shader to avoid artifacts in plenty other effects
+ ShaderBinder binder(ShaderManager::GenericShader, true);
} else {
hideCursor();
data.mask |= PAINT_SCREEN_TRANSFORMED;