diff --git a/effects/coverswitch.cpp b/effects/coverswitch.cpp index e8a79ef37c..f538638b79 100644 --- a/effects/coverswitch.cpp +++ b/effects/coverswitch.cpp @@ -38,6 +38,7 @@ namespace KWin { KWIN_EFFECT( coverswitch, CoverSwitchEffect ) +KWIN_EFFECT_SUPPORTED( coverswitch, CoverSwitchEffect::supported() ) CoverSwitchEffect::CoverSwitchEffect() : mActivated( 0 ) @@ -59,6 +60,14 @@ CoverSwitchEffect::~CoverSwitchEffect() { } +bool CoverSwitchEffect::supported() + { + if( effects->compositingType() == OpenGLCompositing ) + return true; + else + return false; + } + void CoverSwitchEffect::reconfigure( ReconfigureFlags ) { KConfigGroup conf = effects->effectConfig( "CoverSwitch" ); diff --git a/effects/coverswitch.h b/effects/coverswitch.h index 75fbf9c9fc..1ee04e6dfb 100644 --- a/effects/coverswitch.h +++ b/effects/coverswitch.h @@ -51,6 +51,7 @@ class CoverSwitchEffect virtual void tabBoxUpdated(); virtual void windowInputMouseEvent( Window w, QEvent* e ); + static bool supported(); private: void paintScene( EffectWindow* frontWindow, QList< EffectWindow* >* leftWindows, QList< EffectWindow* >* rightWindows, bool reflectedWindows = false ); diff --git a/effects/cube.cpp b/effects/cube.cpp index 0007276d51..f5282d8b4c 100644 --- a/effects/cube.cpp +++ b/effects/cube.cpp @@ -42,6 +42,7 @@ namespace KWin { KWIN_EFFECT( cube, CubeEffect ) +KWIN_EFFECT_SUPPORTED( cube, CubeEffect::supported() ) CubeEffect::CubeEffect() : activated( false ) @@ -91,6 +92,14 @@ CubeEffect::CubeEffect() connect( a, SIGNAL( triggered( bool )), this, SLOT( toggle())); } +bool CubeEffect::supported() + { + if( effects->compositingType() == OpenGLCompositing ) + return true; + else + return false; + } + void CubeEffect::reconfigure( ReconfigureFlags ) { loadConfig( "Cube" ); diff --git a/effects/cube.h b/effects/cube.h index f860fa97e2..eb4b72a32d 100644 --- a/effects/cube.h +++ b/effects/cube.h @@ -50,6 +50,8 @@ class CubeEffect virtual void tabBoxAdded( int mode ); virtual void tabBoxUpdated(); virtual void tabBoxClosed(); + + static bool supported(); protected slots: void toggle(); protected: diff --git a/effects/flipswitch.cpp b/effects/flipswitch.cpp index d2bbd05b11..7fb8d4012c 100644 --- a/effects/flipswitch.cpp +++ b/effects/flipswitch.cpp @@ -35,6 +35,7 @@ namespace KWin { KWIN_EFFECT( flipswitch, FlipSwitchEffect ) +KWIN_EFFECT_SUPPORTED( flipswitch, FlipSwitchEffect::supported() ) FlipSwitchEffect::FlipSwitchEffect() : mActivated( 0 ) @@ -55,6 +56,14 @@ FlipSwitchEffect::~FlipSwitchEffect() { } +bool FlipSwitchEffect::supported() + { + if( effects->compositingType() == OpenGLCompositing ) + return true; + else + return false; + } + void FlipSwitchEffect::reconfigure( ReconfigureFlags ) { KConfigGroup conf = effects->effectConfig( "FlipSwitch" ); diff --git a/effects/flipswitch.h b/effects/flipswitch.h index e2b6b665e7..b74890f6bc 100644 --- a/effects/flipswitch.h +++ b/effects/flipswitch.h @@ -41,6 +41,8 @@ class FlipSwitchEffect virtual void tabBoxAdded( int mode ); virtual void tabBoxClosed(); virtual void tabBoxUpdated(); + + static bool supported(); private: void paintWindowFlip( EffectWindow* w, bool draw = true, float opacity = 0.8 ); bool mActivated; diff --git a/effects/snow.cpp b/effects/snow.cpp index a9d4dada9d..dc2a6e0887 100644 --- a/effects/snow.cpp +++ b/effects/snow.cpp @@ -42,6 +42,7 @@ namespace KWin { KWIN_EFFECT( snow, SnowEffect ) +KWIN_EFFECT_SUPPORTED( snow, SnowEffect::supported() ) SnowEffect::SnowEffect() : texture( NULL ) @@ -69,6 +70,14 @@ SnowEffect::~SnowEffect() delete mShader; } +bool SnowEffect::supported() + { + if( effects->compositingType() == OpenGLCompositing ) + return true; + else + return false; + } + void SnowEffect::reconfigure( ReconfigureFlags ) { KConfigGroup conf = effects->effectConfig("Snow"); diff --git a/effects/snow.h b/effects/snow.h index d11bc60e3d..e8a96cedfb 100644 --- a/effects/snow.h +++ b/effects/snow.h @@ -77,6 +77,7 @@ class SnowEffect virtual void postPaintScreen(); virtual void paintWindow( EffectWindow* w, int mask, QRegion region, WindowPaintData& data ); + static bool supported(); private slots: void toggle(); private: