diff --git a/effects/CMakeLists.txt b/effects/CMakeLists.txt index 2e048968a0..00ed91fefb 100644 --- a/effects/CMakeLists.txt +++ b/effects/CMakeLists.txt @@ -18,6 +18,7 @@ SET(kwin4_effect_builtins_sources SET(kwin4_effect_tests_sources test_input.cpp + test_shiftworkspaceup.cpp test_thumbnail.cpp ) @@ -59,6 +60,7 @@ install( FILES diminactive.desktop zoom.desktop test_input.desktop + test_shiftworkspaceup.desktop test_thumbnail.desktop DESTINATION ${DATA_INSTALL_DIR}/kwin/effects ) diff --git a/effects/shiftworkspaceup.cpp b/effects/test_shiftworkspaceup.cpp similarity index 83% rename from effects/shiftworkspaceup.cpp rename to effects/test_shiftworkspaceup.cpp index da0894821c..de0d3e7545 100644 --- a/effects/shiftworkspaceup.cpp +++ b/effects/test_shiftworkspaceup.cpp @@ -8,13 +8,13 @@ You can Freely distribute this program under the GNU General Public License. See the file "COPYING" for the exact licensing terms. ******************************************************************/ -#include "shiftworkspaceup.h" - -#include +#include "test_shiftworkspaceup.h" namespace KWin { +KWIN_EFFECT( ShiftWorkspaceUp, ShiftWorkspaceUpEffect ) + ShiftWorkspaceUpEffect::ShiftWorkspaceUpEffect() : up( false ) , diff( 0 ) @@ -30,7 +30,7 @@ void ShiftWorkspaceUpEffect::prePaintScreen( int* mask, QRegion* region, int tim if( !up && diff > 0 ) diff = qBound( 0, diff - time, 1000 ); if( diff != 0 ) - *mask |= Scene::PAINT_SCREEN_TRANSFORMED; + *mask |= PAINT_SCREEN_TRANSFORMED; effects->prePaintScreen( mask, region, time ); } @@ -44,16 +44,16 @@ void ShiftWorkspaceUpEffect::paintScreen( int mask, QRegion region, ScreenPaintD void ShiftWorkspaceUpEffect::postPaintScreen() { if( up ? diff < 1000 : diff > 0 ) - workspace()->addRepaintFull(); // trigger next animation repaint + effects->addRepaintFull(); // trigger next animation repaint effects->postPaintScreen(); } void ShiftWorkspaceUpEffect::tick() { up = !up; - workspace()->addRepaintFull(); + effects->addRepaintFull(); } } // namespace -#include "shiftworkspaceup.moc" +#include "test_shiftworkspaceup.moc" diff --git a/effects/test_shiftworkspaceup.desktop b/effects/test_shiftworkspaceup.desktop new file mode 100644 index 0000000000..15fb5e5edc --- /dev/null +++ b/effects/test_shiftworkspaceup.desktop @@ -0,0 +1,4 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=TestShiftWorkspaceUp +X-KDE-Library=kwin4_effect_tests diff --git a/effects/shiftworkspaceup.h b/effects/test_shiftworkspaceup.h similarity index 90% rename from effects/shiftworkspaceup.h rename to effects/test_shiftworkspaceup.h index 92eae6cc76..9362f77deb 100644 --- a/effects/shiftworkspaceup.h +++ b/effects/test_shiftworkspaceup.h @@ -8,12 +8,12 @@ You can Freely distribute this program under the GNU General Public License. See the file "COPYING" for the exact licensing terms. ******************************************************************/ -#ifndef KWIN_SHIFTWORKSPACEUP_H -#define KWIN_SHIFTWORKSPACEUP_H +#ifndef KWIN_TEST_SHIFTWORKSPACEUP_H +#define KWIN_TEST_SHIFTWORKSPACEUP_H #include -#include +#include namespace KWin {