From 5dfa8becb5761edc3c83f7deed959d96a3e8ff43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Sun, 12 Dec 2010 14:06:46 +0100 Subject: [PATCH] FlipSwitch ported to GLES. Multi-screen mode not yet included --- effects/CMakeLists.txt | 2 +- effects/flipswitch/flipswitch.cpp | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/effects/CMakeLists.txt b/effects/CMakeLists.txt index 4c320ce99a..cb9807cbec 100644 --- a/effects/CMakeLists.txt +++ b/effects/CMakeLists.txt @@ -89,6 +89,7 @@ endif( NOT KWIN_HAVE_OPENGLES_COMPOSITING ) # OpenGL-specific effects if( KWIN_HAVE_OPENGL_COMPOSITING ) + include( flipswitch/CMakeLists.txt ) include( glide/CMakeLists.txt ) include( sheet/CMakeLists.txt ) include( snaphelper/CMakeLists.txt ) @@ -100,7 +101,6 @@ if( KWIN_HAVE_OPENGL_COMPOSITING AND NOT KWIN_HAVE_OPENGLES_COMPOSITING ) include( coverswitch/CMakeLists.txt ) include( cube/CMakeLists.txt ) include( explosion/CMakeLists.txt ) - include( flipswitch/CMakeLists.txt ) include( invert/CMakeLists.txt ) include( lookingglass/CMakeLists.txt ) include( magnifier/CMakeLists.txt ) diff --git a/effects/flipswitch/flipswitch.cpp b/effects/flipswitch/flipswitch.cpp index 5533739183..d0cbab5df6 100644 --- a/effects/flipswitch/flipswitch.cpp +++ b/effects/flipswitch/flipswitch.cpp @@ -236,6 +236,8 @@ void FlipSwitchEffect::paintScreen( int mask, QRegion region, ScreenPaintData& d // TODO: move to kwinglutils if( effects->numScreens() > 1 ) { + // TODO: GLES variant +#ifndef KWIN_HAVE_OPENGLES // unfortunatelly we have to change the projection matrix in dual screen mode QRect fullRect = effects->clientArea( FullArea, effects->activeScreen(), effects->currentDesktop() ); glMatrixMode( GL_PROJECTION ); @@ -287,6 +289,7 @@ void FlipSwitchEffect::paintScreen( int mask, QRegion region, ScreenPaintData& d glMatrixMode( GL_MODELVIEW ); glPushMatrix(); glTranslatef( xTranslate, yTranslate, 0.0 ); +#endif } int winMask = PAINT_WINDOW_TRANSFORMED | PAINT_WINDOW_TRANSLUCENT; @@ -399,11 +402,13 @@ void FlipSwitchEffect::paintScreen( int mask, QRegion region, ScreenPaintData& d if( effects->numScreens() > 1 ) { +#ifndef KWIN_HAVE_OPENGLES glPopMatrix(); // revert change of projection matrix glMatrixMode( GL_PROJECTION ); glPopMatrix(); glMatrixMode( GL_MODELVIEW ); +#endif } if( m_windowTitle )