From e25f43ceb01fe49a5a0c92c7ff365ac04cd1ef5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Sat, 20 Nov 2010 10:42:45 +0100 Subject: [PATCH] Attribute stack not available in ES --- lib/kwineffects.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/kwineffects.cpp b/lib/kwineffects.cpp index ffa1ee9621..b292e2b310 100644 --- a/lib/kwineffects.cpp +++ b/lib/kwineffects.cpp @@ -866,7 +866,9 @@ PaintClipper::Iterator::Iterator() #ifdef KWIN_HAVE_OPENGL_COMPOSITING if( clip() && effects->compositingType() == OpenGLCompositing ) { +#ifndef KWIN_HAVE_OPENGLES glPushAttrib( GL_SCISSOR_BIT ); +#endif if( !effects->isRenderTargetBound() ) glEnable( GL_SCISSOR_TEST ); data->rects = paintArea().rects(); @@ -888,7 +890,13 @@ PaintClipper::Iterator::~Iterator() { #ifdef KWIN_HAVE_OPENGL_COMPOSITING if( clip() && effects->compositingType() == OpenGLCompositing ) + { + if( !effects->isRenderTargetBound() ) + glDisable( GL_SCISSOR_TEST ); +#ifndef KWIN_HAVE_OPENGLES glPopAttrib(); +#endif + } #endif #ifdef KWIN_HAVE_XRENDER_COMPOSITING if( clip() && effects->compositingType() == XRenderCompositing )