Convert to OpenGL coordinates.

svn path=/branches/work/kwin_composite/; revision=606378
This commit is contained in:
Luboš Luňák 2006-11-20 08:39:48 +00:00
parent 376fd954c3
commit 3e534d7d75

View file

@ -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