summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2010-10-28 18:15:04 (GMT)
committerJørgen Lind <jorgen.lind@nokia.com>2011-01-25 18:02:23 (GMT)
commitb026c22b06647dadbe76943fe174e57f82ac2b50 (patch)
tree0e48e3158c13b56d2e1abf0b7c31b63cab1581fd /src/plugins/platforms
parentadbcd0f749e7ce8d7a95ed919e0a37fa5b219f06 (diff)
downloadQt-b026c22b06647dadbe76943fe174e57f82ac2b50.zip
Qt-b026c22b06647dadbe76943fe174e57f82ac2b50.tar.gz
Qt-b026c22b06647dadbe76943fe174e57f82ac2b50.tar.bz2
Wayland: fix geometry of swapBuffers
If the geometry isn't mapped 1:1 we need to divide the bottom by height, not width, to calculate the texture rectangle.
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r--src/plugins/platforms/wayland/qwaylandintegration.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/platforms/wayland/qwaylandintegration.cpp b/src/plugins/platforms/wayland/qwaylandintegration.cpp
index 879fd73..4767f56 100644
--- a/src/plugins/platforms/wayland/qwaylandintegration.cpp
+++ b/src/plugins/platforms/wayland/qwaylandintegration.cpp
@@ -654,7 +654,8 @@ void QWaylandGLContext::swapBuffers()
if (geometry.bottom() == (geometry.height() - 1))
r.setTop(1.0f);
else
- r.setTop((geometry.bottom() / w) * 2.0f - 1.0f);
+ r.setTop((geometry.bottom() / h) * 2.0f - 1.0f);
+
drawTexture(r, mBuffer->mTexture, mWindow->widget()->size(), geometry);
wl_surface_damage(mParentWindow->surface(), 0, 0,