diff --git a/libkwineffects/kwinglutils.cpp b/libkwineffects/kwinglutils.cpp index b7514e1490..cbf2a74842 100644 --- a/libkwineffects/kwinglutils.cpp +++ b/libkwineffects/kwinglutils.cpp @@ -1038,6 +1038,7 @@ QStack GLRenderTarget::s_renderTargets = QStackenable(); s_renderTargets.push(target); } @@ -1086,10 +1090,8 @@ GLRenderTarget* GLRenderTarget::popRenderTarget() if (!s_renderTargets.isEmpty()) { s_renderTargets.top()->enable(); } else { - glViewport (-s_virtualScreenGeometry.x(), s_virtualScreenGeometry.height() - s_virtualScreenSize.height() - s_virtualScreenGeometry.y(), - s_virtualScreenSize.width(), s_virtualScreenSize.height()); + glViewport (s_virtualScreenViewport[0], s_virtualScreenViewport[1], s_virtualScreenViewport[2], s_virtualScreenViewport[3]); } - return ret; } diff --git a/libkwineffects/kwinglutils.h b/libkwineffects/kwinglutils.h index 9d1935544e..da2bedfc7f 100644 --- a/libkwineffects/kwinglutils.h +++ b/libkwineffects/kwinglutils.h @@ -534,6 +534,7 @@ private: static QSize s_virtualScreenSize; static QRect s_virtualScreenGeometry; static qreal s_virtualScreenScale; + static GLint s_virtualScreenViewport[4]; GLTexture mTexture; bool mValid;