Do not activate OpenGL only effects in XRender mode.
BUG: 176617 svn path=/trunk/KDE/kdebase/workspace/; revision=892361
This commit is contained in:
parent
f6d8309251
commit
39d23a7ab3
8 changed files with 42 additions and 0 deletions
|
@ -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" );
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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" );
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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" );
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue