diff --git a/effects/CMakeLists.txt b/effects/CMakeLists.txt
index 36db4ea2b1..9928ec9754 100644
--- a/effects/CMakeLists.txt
+++ b/effects/CMakeLists.txt
@@ -79,12 +79,12 @@ include( slidingpopups/CMakeLists.txt )
include( taskbarthumbnail/CMakeLists.txt )
include( thumbnailaside/CMakeLists.txt )
include( windowgeometry/CMakeLists.txt )
+include( zoom/CMakeLists.txt )
if( NOT KWIN_HAVE_OPENGLES_COMPOSITING )
include( logout/CMakeLists.txt )
include( shadow/CMakeLists.txt )
include( showfps/CMakeLists.txt )
-include( zoom/CMakeLists.txt )
endif( NOT KWIN_HAVE_OPENGLES_COMPOSITING )
# OpenGL-specific effects
diff --git a/effects/zoom/zoom.cpp b/effects/zoom/zoom.cpp
index 7aea08102c..93cd03f9c1 100644
--- a/effects/zoom/zoom.cpp
+++ b/effects/zoom/zoom.cpp
@@ -38,10 +38,6 @@ along with this program. If not, see .
#include
#include
-#ifdef KWIN_HAVE_OPENGL_COMPOSITING
-#include
-#endif
-
namespace KWin
{
@@ -348,7 +344,9 @@ void ZoomEffect::paintScreen( int mask, QRegion region, ScreenPaintData& data )
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
if( texture )
{
+#ifndef KWIN_HAVE_OPENGLES
glPushAttrib( GL_CURRENT_BIT | GL_ENABLE_BIT );
+#endif
texture->bind();
glEnable( GL_BLEND );
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
@@ -363,7 +361,10 @@ void ZoomEffect::paintScreen( int mask, QRegion region, ScreenPaintData& data )
QRect rect(p.x() * zoom + data.xTranslate, p.y() * zoom + data.yTranslate, w, h);
texture->render(region, rect);
texture->unbind();
+ glDisable(GL_BLEND);
+#ifndef KWIN_HAVE_OPENGLES
glPopAttrib();
+#endif
}
#endif
#ifdef KWIN_HAVE_XRENDER_COMPOSITING