diff --git a/effects.cpp b/effects.cpp index d9dc99953c..431253b190 100644 --- a/effects.cpp +++ b/effects.cpp @@ -570,6 +570,20 @@ bool EffectWindowImpl::isDeleted() const return (dynamic_cast( toplevel ) != 0); } +void EffectWindowImpl::refWindow() + { + if( Deleted* d = dynamic_cast< Deleted* >( toplevel )) + return d->refWindow(); + abort(); // TODO + } + +void EffectWindowImpl::unrefWindow() + { + if( Deleted* d = dynamic_cast< Deleted* >( toplevel )) + return d->unrefWindow(); + abort(); // TODO + } + const Toplevel* EffectWindowImpl::window() const { return toplevel; @@ -635,6 +649,27 @@ QRect EffectWindowImpl::rect() const return toplevel->rect(); } +bool EffectWindowImpl::isUserMove() const + { + if( Client* c = dynamic_cast< Client* >( toplevel )) + return c->isMove(); + return false; + } + +bool EffectWindowImpl::isUserResize() const + { + if( Client* c = dynamic_cast< Client* >( toplevel )) + return c->isResize(); + return false; + } + +QRect EffectWindowImpl::iconGeometry() const + { + if( Client* c = dynamic_cast< Client* >( toplevel )) + return c->iconGeometry(); + return QRect(); + } + bool EffectWindowImpl::isDesktop() const { return toplevel->isDesktop(); diff --git a/effects.h b/effects.h index 89e0ba9481..a7d56acebe 100644 --- a/effects.h +++ b/effects.h @@ -95,6 +95,8 @@ class EffectWindowImpl : public EffectWindow virtual void addRepaint( int x, int y, int w, int h ); virtual void addRepaintFull(); + virtual void refWindow(); + virtual void unrefWindow(); virtual bool isDeleted() const; virtual bool isOnAllDesktops() const; @@ -111,6 +113,9 @@ class EffectWindowImpl : public EffectWindow virtual QPoint pos() const; virtual QSize size() const; virtual QRect rect() const; + virtual bool isUserMove() const; + virtual bool isUserResize() const; + virtual QRect iconGeometry() const; virtual bool isDesktop() const; virtual bool isDock() const; diff --git a/effects/CMakeLists.txt b/effects/CMakeLists.txt index 00ed91fefb..951ce32366 100644 --- a/effects/CMakeLists.txt +++ b/effects/CMakeLists.txt @@ -11,12 +11,18 @@ include_directories( ) SET(kwin4_effect_builtins_sources - presentwindows.cpp diminactive.cpp + flame.cpp + maketransparent.cpp + minimizeanimation.cpp + presentwindows.cpp + scalein.cpp + shakymove.cpp zoom.cpp ) SET(kwin4_effect_tests_sources + howto.cpp test_input.cpp test_shiftworkspaceup.cpp test_thumbnail.cpp @@ -56,8 +62,14 @@ endif (X11_Xrender_FOUND) KWIN4_ADD_EFFECT(tests ${kwin4_effect_tests_sources}) install( FILES - presentwindows.desktop diminactive.desktop + flame.desktop + howto.desktop + maketransparent.desktop + minimizeanimation.desktop + presentwindows.desktop + scalein.desktop + shakymove.desktop zoom.desktop test_input.desktop test_shiftworkspaceup.desktop diff --git a/effects/demo_taskbarthumbnail.cpp b/effects/demo_taskbarthumbnail.cpp index fb29ea95c9..31c65fd439 100644 --- a/effects/demo_taskbarthumbnail.cpp +++ b/effects/demo_taskbarthumbnail.cpp @@ -15,9 +15,6 @@ License. See the file "COPYING" for the exact licensing terms. #include -// Note that currently effects need to be manually enabled in the EffectsHandler -// class constructor (in effects.cpp). - namespace KWin { diff --git a/effects/dialogparent.cpp b/effects/dialogparent.cpp index 17707b86a6..0469164a87 100644 --- a/effects/dialogparent.cpp +++ b/effects/dialogparent.cpp @@ -13,9 +13,6 @@ License. See the file "COPYING" for the exact licensing terms. #include -// Note that currently effects need to be manually enabled in the EffectsHandler -// class constructor (in effects.cpp). - namespace KWin { diff --git a/effects/flame.cpp b/effects/flame.cpp index 3c7041c32c..1b7a0f6557 100644 --- a/effects/flame.cpp +++ b/effects/flame.cpp @@ -10,16 +10,17 @@ License. See the file "COPYING" for the exact licensing terms. #include "flame.h" -#include -#include +#include namespace KWin { +KWIN_EFFECT( Flame, FlameEffect ) + void FlameEffect::prePaintScreen( int* mask, QRegion* region, int time ) { if( !windows.isEmpty()) - *mask |= Scene::PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS; + *mask |= PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS; effects->prePaintScreen(mask, region, time); } @@ -27,22 +28,18 @@ void FlameEffect::prePaintWindow( EffectWindow* w, int* mask, QRegion* paint, QR { if( windows.contains( w )) { - SceneOpenGL::Window* glwin = dynamic_cast< SceneOpenGL::Window* >( w->sceneWindow()); - if( glwin ) + if( windows[ w ] < 1 ) { - if( windows[ w ] < 1 ) - { - windows[ w ] += time / 500.; - *mask |= Scene::PAINT_WINDOW_TRANSFORMED; - glwin->enablePainting( Scene::Window::PAINT_DISABLED_BY_DELETE ); - // Request the window to be divided into cells - glwin->requestVertexGrid( qMax( glwin->height() / 50, 5 )); - } - else - { - windows.remove( w ); - static_cast< Deleted* >( w->window())->unrefWindow(); - } + windows[ w ] += time / 500.; + *mask |= PAINT_WINDOW_TRANSFORMED; + w->enablePainting( EffectWindow::PAINT_DISABLED_BY_DELETE ); + // Request the window to be divided into cells + w->requestVertexGrid( qMax( w->height() / 50, 5 )); + } + else + { + windows.remove( w ); + w->unrefWindow(); } } effects->prePaintWindow( w, mask, paint, clip, time ); @@ -52,38 +49,34 @@ void FlameEffect::paintWindow( EffectWindow* w, int mask, QRegion region, Window { if( windows.contains( w )) { - SceneOpenGL::Window* glwin = dynamic_cast< SceneOpenGL::Window* >( w->sceneWindow() ); - if( glwin ) + QVector< Vertex >& vertices = w->vertices(); + QVector< Vertex > new_vertices; + double ylimit = windows[ w ] * w->height(); // parts above this are already away + assert( vertices.count() % 4 == 0 ); + for( int i = 0; + i < vertices.count(); + i += 4 ) { - QVector< SceneOpenGL::Window::Vertex >& vertices = glwin->vertices(); - QVector< SceneOpenGL::Window::Vertex > new_vertices; - double ylimit = windows[ w ] * w->height(); // parts above this are already away - assert( vertices.count() % 4 == 0 ); - for( int i = 0; - i < vertices.count(); - i += 4 ) + bool is_in = false; + for( int j = 0; + j < 4; + ++j ) + if( vertices[ i + j ].pos[ 1 ] >= ylimit ) + is_in = true; + if( !is_in ) + continue; + for( int j = 0; + j < 4; + ++j ) { - bool is_in = false; - for( int j = 0; - j < 4; - ++j ) - if( vertices[ i + j ].pos[ 1 ] >= ylimit ) - is_in = true; - if( !is_in ) - continue; - for( int j = 0; - j < 4; - ++j ) - { - SceneOpenGL::Window::Vertex vertex = vertices[ i + j ]; - new_vertices.append( vertex ); - } + Vertex vertex = vertices[ i + j ]; + new_vertices.append( vertex ); } - if( new_vertices.isEmpty()) - return; // nothing to paint - glwin->vertices() = new_vertices; - glwin->markVerticesDirty(); } + if( new_vertices.isEmpty()) + return; // nothing to paint + w->vertices() = new_vertices; + w->markVerticesDirty(); } effects->paintWindow( w, mask, region, data ); } @@ -91,14 +84,14 @@ void FlameEffect::paintWindow( EffectWindow* w, int mask, QRegion region, Window void FlameEffect::postPaintWindow( EffectWindow* w ) { if( windows.contains( w )) - workspace()->addRepaint( w->geometry()); // workspace, since the window under it will need painting too + effects->addRepaint( w->geometry()); // workspace, since the window under it will need painting too effects->postPaintScreen(); } void FlameEffect::windowClosed( EffectWindow* c ) { windows[ c ] = 0; - static_cast< Deleted* >( c->window())->refWindow(); + c->refWindow(); } void FlameEffect::windowDeleted( EffectWindow* c ) diff --git a/effects/flame.desktop b/effects/flame.desktop new file mode 100644 index 0000000000..29a164f2df --- /dev/null +++ b/effects/flame.desktop @@ -0,0 +1,4 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=Flame +X-KDE-Library=kwin4_effect_builtins diff --git a/effects/flame.h b/effects/flame.h index 5fe9e194d9..b7b577da5a 100644 --- a/effects/flame.h +++ b/effects/flame.h @@ -11,7 +11,7 @@ License. See the file "COPYING" for the exact licensing terms. #ifndef KWIN_FLAME_H #define KWIN_FLAME_H -#include +#include namespace KWin { diff --git a/effects/howto.cpp b/effects/howto.cpp index d0dad3d1ce..9cdf1af901 100644 --- a/effects/howto.cpp +++ b/effects/howto.cpp @@ -20,11 +20,6 @@ License. See the file "COPYING" for the exact licensing terms. // Include the class definition. #include "howto.h" -#include "deleted.h" - -// Note that currently effects need to be manually enabled in the EffectsHandler -// class constructor (in effects.cpp). - namespace KWin { @@ -51,8 +46,8 @@ void HowtoEffect::prePaintWindow( EffectWindow* w, int* mask, QRegion* paint, QR { // Since the effect will make the window translucent, explicitly change // the flags so that the window will be painted only as translucent. - *mask |= Scene::PAINT_WINDOW_TRANSLUCENT; - *mask &= ~Scene::PAINT_WINDOW_OPAQUE; + *mask |= PAINT_WINDOW_TRANSLUCENT; + *mask &= ~PAINT_WINDOW_OPAQUE; } else { @@ -115,9 +110,7 @@ void HowtoEffect::postPaintWindow( EffectWindow* w ) if( w == fade_window ) { // Trigger repaint of the whole window, this will cause it to be repainted the next painting pass. - // Currently the API for effects is not complete, so for now window() is used to access - // internal class Toplevel. This should change in the future. - w->window()->addRepaintFull(); // trigger next animation repaint + w->addRepaintFull(); // trigger next animation repaint } // Call the next effect. effects->postPaintWindow( w ); @@ -133,7 +126,7 @@ void HowtoEffect::windowActivated( EffectWindow* c ) // If there is a window to be faded, reset the progress to zero. progress = 0; // And add repaint to the window so that it needs to be repainted. - c->window()->addRepaintFull(); + c->addRepaintFull(); } } @@ -146,6 +139,7 @@ void HowtoEffect::windowClosed( EffectWindow* c ) fade_window = NULL; } -// That's all. Don't forget to enable the effect as described at the beginning of this file. +// That's all. Now only the matching .desktop file is needed. + } // namespace diff --git a/effects/howto.desktop b/effects/howto.desktop new file mode 100644 index 0000000000..3e9af44a24 --- /dev/null +++ b/effects/howto.desktop @@ -0,0 +1,6 @@ +[Desktop Entry] +Encoding=UTF-8 +# Name of the effect +Name=Howto +# The plugin (library) which contains the effect. One library may contain more effects. +X-KDE-Library=kwin4_effect_tests diff --git a/effects/howto.h b/effects/howto.h index 3a4605e930..b7e4499fa4 100644 --- a/effects/howto.h +++ b/effects/howto.h @@ -19,7 +19,7 @@ License. See the file "COPYING" for the exact licensing terms. #define KWIN_HOWTO_H // Include with base class for effects. -#include +#include // Everything in KWin is in a namespace. There's no need to prefix names // with KWin or K, there's no (big) need to care about symbol clashes. diff --git a/effects/maketransparent.cpp b/effects/maketransparent.cpp index 123a704e2d..76a2e5bafe 100644 --- a/effects/maketransparent.cpp +++ b/effects/maketransparent.cpp @@ -10,36 +10,34 @@ License. See the file "COPYING" for the exact licensing terms. #include "maketransparent.h" -#include - namespace KWin { +KWIN_EFFECT( MakeTransparent, MakeTransparentEffect ) + void MakeTransparentEffect::prePaintWindow( EffectWindow* w, int* mask, QRegion* paint, QRegion* clip, int time ) { - const Client* c = dynamic_cast< const Client* >( w->window()); - if(( c != NULL && ( c->isMove() || c->isResize())) || w->window()->isDialog()) + if(( w->isUserMove() || w->isUserResize()) || w->isDialog()) { - *mask |= Scene::PAINT_WINDOW_TRANSLUCENT; - *mask &= ~Scene::PAINT_WINDOW_OPAQUE; + *mask |= PAINT_WINDOW_TRANSLUCENT; + *mask &= ~PAINT_WINDOW_OPAQUE; } effects->prePaintWindow( w, mask, paint, clip, time ); } void MakeTransparentEffect::paintWindow( EffectWindow* w, int mask, QRegion region, WindowPaintData& data ) { - const Client* c = dynamic_cast< const Client* >( w->window()); - if( w->window()->isDialog()) + if( w->isDialog()) data.opacity *= 0.8; - if( c != NULL && ( c->isMove() || c->isResize())) + if( w->isUserMove() || w->isUserResize()) data.opacity *= 0.5; effects->paintWindow( w, mask, region, data ); } -void MakeTransparentEffect::windowUserMovedResized( EffectWindow* c, bool first, bool last ) +void MakeTransparentEffect::windowUserMovedResized( EffectWindow* w, bool first, bool last ) { if( first || last ) - c->window()->addRepaintFull(); + w->addRepaintFull(); } } // namespace diff --git a/effects/maketransparent.desktop b/effects/maketransparent.desktop new file mode 100644 index 0000000000..097dfe130f --- /dev/null +++ b/effects/maketransparent.desktop @@ -0,0 +1,4 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=MakeTransparent +X-KDE-Library=kwin4_effect_builtins diff --git a/effects/maketransparent.h b/effects/maketransparent.h index f169ae913f..3d532b99b0 100644 --- a/effects/maketransparent.h +++ b/effects/maketransparent.h @@ -11,7 +11,7 @@ License. See the file "COPYING" for the exact licensing terms. #ifndef KWIN_MAKETRANSPARENT_H #define KWIN_MAKETRANSPARENT_H -#include +#include namespace KWin { diff --git a/effects/minimizeanimation.cpp b/effects/minimizeanimation.cpp index 9e30ab6e73..9c7b05814f 100644 --- a/effects/minimizeanimation.cpp +++ b/effects/minimizeanimation.cpp @@ -11,16 +11,11 @@ License. See the file "COPYING" for the exact licensing terms. #include "minimizeanimation.h" -#include -#include - - -// Note that currently effects need to be manually enabled in the EffectsHandler -// class constructor (in effects.cpp). - namespace KWin { +KWIN_EFFECT( MinimizeAnimation, MinimizeAnimationEffect ) + MinimizeAnimationEffect::MinimizeAnimationEffect() { mActiveAnimations = 0; @@ -32,7 +27,7 @@ void MinimizeAnimationEffect::prePaintScreen( int* mask, QRegion* region, int ti if( mActiveAnimations > 0 ) // We need to mark the screen windows as transformed. Otherwise the // whole screen won't be repainted, resulting in artefacts - *mask |= Scene::PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS; + *mask |= PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS; effects->prePaintScreen(mask, region, time); } @@ -42,8 +37,7 @@ void MinimizeAnimationEffect::prePaintWindow( EffectWindow* w, int* mask, QRegio const float changeTime = 500; if( mAnimationProgress.contains( w )) { - Client* c = static_cast< Client* >( w->window() ); - if( c->isMinimized() ) + if( w->isMinimized() ) { mAnimationProgress[w] += time / changeTime; if( mAnimationProgress[w] >= 1.0f ) @@ -61,8 +55,8 @@ void MinimizeAnimationEffect::prePaintWindow( EffectWindow* w, int* mask, QRegio if( mAnimationProgress.contains( w )) { // We'll transform this window - *mask |= Scene::PAINT_WINDOW_TRANSFORMED; - w->enablePainting( Scene::Window::PAINT_DISABLED_BY_MINIMIZE ); + *mask |= PAINT_WINDOW_TRANSFORMED; + w->enablePainting( EffectWindow::PAINT_DISABLED_BY_MINIMIZE ); } else // Animation just finished @@ -79,9 +73,8 @@ void MinimizeAnimationEffect::paintWindow( EffectWindow* w, int mask, QRegion re // 0 = not minimized, 1 = fully minimized float progress = mAnimationProgress[w]; - Client* c = static_cast< Client* >( w->window() ); - QRect geo = c->geometry(); - QRect icon = c->iconGeometry(); + QRect geo = w->geometry(); + QRect icon = w->iconGeometry(); // If there's no icon geometry, minimize to the center of the screen if( !icon.isValid() ) icon = QRect( displayWidth() / 2, displayHeight() / 2, 0, 0 ); @@ -100,7 +93,7 @@ void MinimizeAnimationEffect::postPaintScreen() { if( mActiveAnimations > 0 ) // Repaint the workspace so that everything would be repainted next time - workspace()->addRepaintFull(); + effects->addRepaintFull(); // Call the next effect. effects->postPaintScreen(); diff --git a/effects/minimizeanimation.desktop b/effects/minimizeanimation.desktop new file mode 100644 index 0000000000..c01b3d598a --- /dev/null +++ b/effects/minimizeanimation.desktop @@ -0,0 +1,4 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=MinimizeAnimation +X-KDE-Library=kwin4_effect_builtins diff --git a/effects/minimizeanimation.h b/effects/minimizeanimation.h index 57dbc5c57a..5aeb4cfc03 100644 --- a/effects/minimizeanimation.h +++ b/effects/minimizeanimation.h @@ -12,7 +12,7 @@ License. See the file "COPYING" for the exact licensing terms. #define KWIN_MINIMIZEANIMATION_H // Include with base class for effects. -#include +#include namespace KWin diff --git a/effects/presentwindows.cpp b/effects/presentwindows.cpp index 911408163a..b2a370fbe4 100644 --- a/effects/presentwindows.cpp +++ b/effects/presentwindows.cpp @@ -22,9 +22,6 @@ License. See the file "COPYING" for the exact licensing terms. -// Note that currently effects need to be manually enabled in the EffectsHandler -// class constructor (in effects.cpp). - namespace KWin { diff --git a/effects/scalein.cpp b/effects/scalein.cpp index 462069033e..98b3964525 100644 --- a/effects/scalein.cpp +++ b/effects/scalein.cpp @@ -10,15 +10,15 @@ License. See the file "COPYING" for the exact licensing terms. #include "scalein.h" -#include - namespace KWin { +KWIN_EFFECT( ScaleIn, ScaleInEffect ) + void ScaleInEffect::prePaintScreen( int* mask, QRegion* region, int time ) { if( !windows.isEmpty()) - *mask |= Scene::PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS; + *mask |= PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS; effects->prePaintScreen( mask, region, time ); } @@ -28,7 +28,7 @@ void ScaleInEffect::prePaintWindow( EffectWindow* w, int* mask, QRegion* paint, { windows[ w ] += time / 500.; // complete change in 500ms if( windows[ w ] < 1 ) - *mask |= Scene::PAINT_WINDOW_TRANSFORMED; + *mask |= PAINT_WINDOW_TRANSFORMED; else windows.remove( w ); } @@ -41,8 +41,8 @@ void ScaleInEffect::paintWindow( EffectWindow* w, int mask, QRegion region, Wind { data.xScale *= windows[ w ]; data.yScale *= windows[ w ]; - data.xTranslate += int( w->window()->width() / 2 * ( 1 - windows[ w ] )); - data.yTranslate += int( w->window()->height() / 2 * ( 1 - windows[ w ] )); + data.xTranslate += int( w->width() / 2 * ( 1 - windows[ w ] )); + data.yTranslate += int( w->height() / 2 * ( 1 - windows[ w ] )); } effects->paintWindow( w, mask, region, data ); } @@ -50,17 +50,16 @@ void ScaleInEffect::paintWindow( EffectWindow* w, int mask, QRegion region, Wind void ScaleInEffect::postPaintWindow( EffectWindow* w ) { if( windows.contains( w )) - w->window()->addRepaintFull(); // trigger next animation repaint + w->addRepaintFull(); // trigger next animation repaint effects->postPaintWindow( w ); } void ScaleInEffect::windowAdded( EffectWindow* c ) { - Client* cc = dynamic_cast< Client* >( c->window()); - if( cc == NULL || cc->isOnCurrentDesktop()) + if( c->isOnCurrentDesktop()) { windows[ c ] = 0; - c->window()->addRepaintFull(); + c->addRepaintFull(); } } diff --git a/effects/scalein.desktop b/effects/scalein.desktop new file mode 100644 index 0000000000..90a9c6c4b5 --- /dev/null +++ b/effects/scalein.desktop @@ -0,0 +1,4 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=Shadow +X-KDE-Library=kwin4_effect_builtins diff --git a/effects/scalein.h b/effects/scalein.h index 301f52dfa5..524d7f9ce6 100644 --- a/effects/scalein.h +++ b/effects/scalein.h @@ -11,7 +11,7 @@ License. See the file "COPYING" for the exact licensing terms. #ifndef KWIN_SCALEIN_H #define KWIN_SCALEIN_H -#include +#include namespace KWin { diff --git a/effects/shakymove.cpp b/effects/shakymove.cpp index 20e821c647..985ee97ef5 100644 --- a/effects/shakymove.cpp +++ b/effects/shakymove.cpp @@ -10,11 +10,11 @@ License. See the file "COPYING" for the exact licensing terms. #include "shakymove.h" -#include - namespace KWin { +KWIN_EFFECT( ShakyMove, ShakyMoveEffect ) + ShakyMoveEffect::ShakyMoveEffect() { connect( &timer, SIGNAL( timeout()), SLOT( tick())); @@ -26,14 +26,14 @@ static const int SHAKY_MAX = sizeof( shaky_diff ) / sizeof( shaky_diff[ 0 ] ); void ShakyMoveEffect::prePaintScreen( int* mask, QRegion* region, int time ) { if( !windows.isEmpty()) - *mask |= Scene::PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS; + *mask |= PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS; effects->prePaintScreen( mask, region, time ); } void ShakyMoveEffect::prePaintWindow( EffectWindow* w, int* mask, QRegion* paint, QRegion* clip, int time ) { if( windows.contains( w )) - *mask |= Scene::PAINT_WINDOW_TRANSFORMED; + *mask |= PAINT_WINDOW_TRANSFORMED; effects->prePaintWindow( w, mask, paint, clip, time ); } @@ -56,7 +56,7 @@ void ShakyMoveEffect::windowUserMovedResized( EffectWindow* c, bool first, bool { windows.remove( c ); // just repaint whole screen, transformation is involved - c->window()->workspace()->addRepaintFull(); + effects->addRepaintFull(); if( windows.isEmpty()) timer.stop(); } @@ -81,7 +81,7 @@ void ShakyMoveEffect::tick() else ++(*it); // just repaint whole screen, transformation is involved - it.key()->window()->workspace()->addRepaintFull(); + effects->addRepaintFull(); } } diff --git a/effects/shakymove.desktop b/effects/shakymove.desktop new file mode 100644 index 0000000000..6f6a003a62 --- /dev/null +++ b/effects/shakymove.desktop @@ -0,0 +1,4 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=ShakyMove +X-KDE-Library=kwin4_effect_builtins diff --git a/effects/shakymove.h b/effects/shakymove.h index 7b3cb7dafb..98889087dd 100644 --- a/effects/shakymove.h +++ b/effects/shakymove.h @@ -13,7 +13,7 @@ License. See the file "COPYING" for the exact licensing terms. #include -#include +#include namespace KWin { diff --git a/effects/wavywindows.cpp b/effects/wavywindows.cpp index 47c3447890..54dd627413 100644 --- a/effects/wavywindows.cpp +++ b/effects/wavywindows.cpp @@ -14,9 +14,6 @@ License. See the file "COPYING" for the exact licensing terms. #include -// Note that currently effects need to be manually enabled in the EffectsHandler -// class constructor (in effects.cpp). - namespace KWin { diff --git a/lib/kwineffects.h b/lib/kwineffects.h index 61f91dd3a0..792f4a7962 100644 --- a/lib/kwineffects.h +++ b/lib/kwineffects.h @@ -234,7 +234,10 @@ class KWIN_EXPORT EffectWindow virtual void addRepaint( int x, int y, int w, int h ) = 0; virtual void addRepaintFull() = 0; + virtual void refWindow() = 0; + virtual void unrefWindow() = 0; virtual bool isDeleted() const = 0; + virtual bool isMinimized() const = 0; virtual bool isOnDesktop( int d ) const; @@ -250,6 +253,9 @@ class KWIN_EXPORT EffectWindow virtual QPoint pos() const = 0; virtual QSize size() const = 0; virtual QRect rect() const = 0; + virtual bool isUserMove() const = 0; + virtual bool isUserResize() const = 0; + virtual QRect iconGeometry() const = 0; virtual QString caption() const = 0; virtual const EffectWindowGroup* group() const = 0;