aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Gräßlin <[email protected]>2016-10-18 16:09:06 +0200
committerMartin Gräßlin <[email protected]>2016-10-18 16:11:22 +0200
commit1708278a451e6dab92549f9cabe6ad13ea3b4ba2 (patch)
tree2831b6ada46ed5cc26afc2c5fb375c01d802b87d
parent03d706150ab4b2196495a99c170dd998fcf2631b (diff)
Fix viewport restore in GLRenderTarget::popRenderTarget
Summary: The viewport needs adjustment in the per-output rendering case. This change ensures the viewport is setup like in the platforms which do per output rendering. For the X11 case (multiple outputs in one render pass) the values are the same as previously. Reviewers: #kwin, #plasma_on_wayland Subscribers: plasma-devel, kwin Tags: #plasma_on_wayland, #kwin Differential Revision: https://phabricator.kde.org/D3099
-rw-r--r--libkwineffects/kwinglutils.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/libkwineffects/kwinglutils.cpp b/libkwineffects/kwinglutils.cpp
index 3a9c344..def6f30 100644
--- a/libkwineffects/kwinglutils.cpp
+++ b/libkwineffects/kwinglutils.cpp
@@ -1178,7 +1178,8 @@ GLRenderTarget* GLRenderTarget::popRenderTarget()
if (!s_renderTargets.isEmpty()) {
s_renderTargets.top()->enable();
} else {
- glViewport (0, 0, s_virtualScreenSize.width(), s_virtualScreenSize.height());
+ glViewport (-s_virtualScreenGeometry.x(), s_virtualScreenGeometry.height() - s_virtualScreenSize.height() - s_virtualScreenGeometry.y(),
+ s_virtualScreenSize.width(), s_virtualScreenSize.height());
}
return ret;