From a4a783d94c58bf1d8c1335cf1307ae60d8971e34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Wed, 1 Apr 2009 09:56:01 +0000 Subject: [PATCH] MagicLamp requires OpenGL. svn path=/trunk/KDE/kdebase/workspace/; revision=947729 --- effects/magiclamp/magiclamp.cpp | 6 ++++++ effects/magiclamp/magiclamp.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/effects/magiclamp/magiclamp.cpp b/effects/magiclamp/magiclamp.cpp index f53a1eb720..e1572cb0d4 100644 --- a/effects/magiclamp/magiclamp.cpp +++ b/effects/magiclamp/magiclamp.cpp @@ -28,6 +28,7 @@ namespace KWin { KWIN_EFFECT( magiclamp, MagicLampEffect ) +KWIN_EFFECT_SUPPORTED( magiclamp, MagicLampEffect::supported() ) MagicLampEffect::MagicLampEffect() { @@ -35,6 +36,11 @@ MagicLampEffect::MagicLampEffect() reconfigure( ReconfigureAll ); } +bool MagicLampEffect::supported() + { + return effects->compositingType() == OpenGLCompositing; + } + void MagicLampEffect::reconfigure( ReconfigureFlags ) { KConfigGroup conf = effects->effectConfig( "MagicLamp" ); diff --git a/effects/magiclamp/magiclamp.h b/effects/magiclamp/magiclamp.h index 800ed04cd1..a7f134da44 100644 --- a/effects/magiclamp/magiclamp.h +++ b/effects/magiclamp/magiclamp.h @@ -41,6 +41,8 @@ class MagicLampEffect virtual void windowMinimized( EffectWindow* c ); virtual void windowUnminimized( EffectWindow* c ); + static bool supported(); + private: QHash< EffectWindow*, TimeLine > mTimeLineWindows; int mActiveAnimations;