Allow effects on window minimize and unminimize.
svn path=/branches/work/kwin_composite/; revision=622778
This commit is contained in:
parent
e3cf0dd455
commit
ee9e4ad715
3 changed files with 29 additions and 0 deletions
|
@ -29,6 +29,7 @@ License. See the file "COPYING" for the exact licensing terms.
|
|||
#include "notifications.h"
|
||||
#include "rules.h"
|
||||
#include "scene.h"
|
||||
#include "effects.h"
|
||||
|
||||
#include <X11/extensions/shape.h>
|
||||
#include <QX11Info>
|
||||
|
@ -556,6 +557,8 @@ void Client::minimize( bool avoid_animation )
|
|||
workspace()->updateMinimizedOfTransients( this );
|
||||
updateWindowRules();
|
||||
workspace()->updateFocusChains( this, Workspace::FocusChainMakeLast );
|
||||
if( effects )
|
||||
effects->windowMinimized( this );
|
||||
}
|
||||
|
||||
void Client::unminimize( bool avoid_animation )
|
||||
|
@ -574,6 +577,8 @@ void Client::unminimize( bool avoid_animation )
|
|||
updateAllowedActions();
|
||||
workspace()->updateMinimizedOfTransients( this );
|
||||
updateWindowRules();
|
||||
if( effects )
|
||||
effects->windowUnminimized( this );
|
||||
}
|
||||
|
||||
extern bool blockAnimation;
|
||||
|
|
20
effects.cpp
20
effects.cpp
|
@ -53,6 +53,14 @@ void Effect::windowActivated( Toplevel* )
|
|||
{
|
||||
}
|
||||
|
||||
void Effect::windowMinimized( Toplevel* )
|
||||
{
|
||||
}
|
||||
|
||||
void Effect::windowUnminimized( Toplevel* )
|
||||
{
|
||||
}
|
||||
|
||||
void Effect::windowInputMouseEvent( Window, QEvent* )
|
||||
{
|
||||
}
|
||||
|
@ -143,6 +151,18 @@ void EffectsHandler::windowActivated( Toplevel* c )
|
|||
e->windowActivated( c );
|
||||
}
|
||||
|
||||
void EffectsHandler::windowMinimized( Toplevel* c )
|
||||
{
|
||||
foreach( Effect* e, effects )
|
||||
e->windowMinimized( c );
|
||||
}
|
||||
|
||||
void EffectsHandler::windowUnminimized( Toplevel* c )
|
||||
{
|
||||
foreach( Effect* e, effects )
|
||||
e->windowUnminimized( c );
|
||||
}
|
||||
|
||||
// start another painting pass
|
||||
void EffectsHandler::startPaint()
|
||||
{
|
||||
|
|
|
@ -75,6 +75,8 @@ class Effect
|
|||
virtual void windowAdded( Toplevel* c );
|
||||
virtual void windowDeleted( Toplevel* c );
|
||||
virtual void windowActivated( Toplevel* c );
|
||||
virtual void windowMinimized( Toplevel* c );
|
||||
virtual void windowUnminimized( Toplevel* c );
|
||||
virtual void windowInputMouseEvent( Window w, QEvent* e );
|
||||
|
||||
// Interpolates between x and y
|
||||
|
@ -110,6 +112,8 @@ class EffectsHandler
|
|||
void windowAdded( Toplevel* c );
|
||||
void windowDeleted( Toplevel* c );
|
||||
void windowActivated( Toplevel* c );
|
||||
void windowMinimized( Toplevel* c );
|
||||
void windowUnminimized( Toplevel* c );
|
||||
bool checkInputWindowEvent( XEvent* e );
|
||||
void checkInputWindowStacking();
|
||||
private:
|
||||
|
|
Loading…
Reference in a new issue