From 3e534d7d7543c4bfc88e02340b1f5e9f5a42469d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Mon, 20 Nov 2006 08:39:48 +0000 Subject: [PATCH] Convert to OpenGL coordinates. svn path=/branches/work/kwin_composite/; revision=606378 --- scene_opengl.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scene_opengl.cpp b/scene_opengl.cpp index ccd902446b..90273b4654 100644 --- a/scene_opengl.cpp +++ b/scene_opengl.cpp @@ -460,7 +460,11 @@ void SceneOpenGL::flushBuffer( int mask, const QRegion& damage ) if( glXCopySubBuffer ) { foreach( QRect r, damage.rects()) - glXCopySubBuffer( display(), glxbuffer, r.x(), r.y(), r.width(), r.height()); + { + // convert to OpenGL coordinates + int y = displayHeight() - r.y() - r.height(); + glXCopySubBuffer( display(), glxbuffer, r.x(), y, r.width(), r.height()); + } } else { // no idea why glScissor() is used, but Compiz has it and it doesn't seem to hurt