From b026c22b06647dadbe76943fe174e57f82ac2b50 Mon Sep 17 00:00:00 2001 From: Jesse Barnes Date: Thu, 28 Oct 2010 11:15:04 -0700 Subject: 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. --- src/plugins/platforms/wayland/qwaylandintegration.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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, -- cgit v0.12