No effects when not compositing.
svn path=/branches/work/kwin_composite/; revision=560594
This commit is contained in:
parent
64bf5bc51e
commit
03fedc56dd
4 changed files with 20 additions and 3 deletions
|
@ -12,6 +12,7 @@ License. See the file "COPYING" for the exact licensing terms.
|
|||
#include "workspace.h"
|
||||
#include "client.h"
|
||||
#include "unmanaged.h"
|
||||
#include "effects.h"
|
||||
#include "scene.h"
|
||||
#include "scene_basic.h"
|
||||
#include "scene_xrender.h"
|
||||
|
@ -36,6 +37,7 @@ void Workspace::setupCompositing()
|
|||
XCompositeRedirectSubwindows( display(), rootWindow(), CompositeRedirectManual );
|
||||
// scene = new SceneBasic( this );
|
||||
scene = new SceneXrender( this );
|
||||
effects = new EffectsHandler( this );
|
||||
addDamage( 0, 0, displayWidth(), displayHeight());
|
||||
foreach( Client* c, clients )
|
||||
c->setupCompositing();
|
||||
|
@ -53,6 +55,8 @@ void Workspace::finishCompositing()
|
|||
c->finishCompositing();
|
||||
XCompositeUnredirectSubwindows( display(), rootWindow(), CompositeRedirectManual );
|
||||
compositeTimer.stop();
|
||||
delete effects;
|
||||
effects = NULL;
|
||||
delete scene;
|
||||
scene = NULL;
|
||||
for( ClientList::ConstIterator it = clients.begin();
|
||||
|
|
14
effects.cpp
14
effects.cpp
|
@ -273,11 +273,25 @@ static ShiftWorkspaceUp* swu;
|
|||
|
||||
EffectsHandler::EffectsHandler( Workspace* ws )
|
||||
{
|
||||
if( !compositing())
|
||||
return;
|
||||
mht = new MakeHalfTransparent;
|
||||
sm = new ShakyMove;
|
||||
// gm = new GrowMove;
|
||||
swu = new ShiftWorkspaceUp( ws );
|
||||
}
|
||||
|
||||
EffectsHandler::~EffectsHandler()
|
||||
{
|
||||
delete mht;
|
||||
mht = NULL;
|
||||
delete sm;
|
||||
sm = NULL;
|
||||
delete gm;
|
||||
gm = NULL;
|
||||
delete swu;
|
||||
swu = NULL;
|
||||
}
|
||||
|
||||
void EffectsHandler::windowUserMovedResized( Toplevel* c, bool first, bool last )
|
||||
{
|
||||
|
|
|
@ -80,6 +80,7 @@ class EffectsHandler
|
|||
{
|
||||
public:
|
||||
EffectsHandler( Workspace* ws );
|
||||
~EffectsHandler();
|
||||
void windowUserMovedResized( Toplevel* c, bool first, bool last );
|
||||
void windowDeleted( Toplevel* c );
|
||||
void transformWindow( Toplevel* c, Matrix& m, EffectData& data );
|
||||
|
|
4
main.cpp
4
main.cpp
|
@ -122,9 +122,7 @@ Application::Application( )
|
|||
initting = false; // TODO
|
||||
|
||||
// create workspace.
|
||||
Workspace* workspace = new Workspace( isSessionRestored() );
|
||||
|
||||
effects = new EffectsHandler( workspace );
|
||||
(void) new Workspace( isSessionRestored() );
|
||||
|
||||
syncX(); // trigger possible errors, there's still a chance to abort
|
||||
|
||||
|
|
Loading…
Reference in a new issue