diff --git a/CMakeLists.txt b/CMakeLists.txt index f73baa76ad..ccb5c485ab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,13 +17,6 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/effects ) -include(UsePkgConfig) -PKGCONFIG(libcaptury CAPTURY_INCLUDES CAPTURY_LINK_DIR CAPTURY_LDFLAGS CAPTURY_CFLAGS) -if( CAPTURY_LDFLAGS ) - SET( CAPTURY_FOUND TRUE ) -endif( CAPTURY_LDFLAGS ) -macro_bool_to_01( CAPTURY_FOUND HAVE_CAPTURY ) - configure_file(config-kwin.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kwin.h ) include_directories(${CMAKE_CURRENT_BINARY_DIR}) @@ -93,10 +86,6 @@ endif (X11_Xrender_FOUND) if (X11_Xfixes_FOUND) target_link_libraries(kdeinit_kwin ${X11_Xfixes_LIB}) endif (X11_Xfixes_FOUND) -if( HAVE_CAPTURY ) - target_link_libraries(kdeinit_kwin ${CAPTURY_LDFLAGS}) -endif( HAVE_CAPTURY ) - install(TARGETS kdeinit_kwin DESTINATION ${LIB_INSTALL_DIR} ) diff --git a/effects/CMakeLists.txt b/effects/CMakeLists.txt index 0d13d87b33..b89bdeda7f 100644 --- a/effects/CMakeLists.txt +++ b/effects/CMakeLists.txt @@ -12,7 +12,6 @@ macro(KWIN4_ADD_EFFECT name) install(TARGETS kwin4_effect_${name} DESTINATION ${PLUGIN_INSTALL_DIR}) endmacro(KWIN4_ADD_EFFECT) - include_directories( ${CMAKE_SOURCE_DIR}/workspace/kwin/lib ) @@ -20,17 +19,30 @@ include_directories( SET(kwin4_effect_builtins_sources presentwindows.cpp diminactive.cpp + zoom.cpp ) if(OPENGL_FOUND) -SET(kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} - shadow.cpp - showfps.cpp - ) -install( FILES - shadow.desktop - showfps.desktop - DESTINATION ${DATA_INSTALL_DIR}/kwin/effects ) + SET(kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources} + shadow.cpp + showfps.cpp + ) + install( FILES + shadow.desktop + showfps.desktop + DESTINATION ${DATA_INSTALL_DIR}/kwin/effects ) + + include(UsePkgConfig) + PKGCONFIG(libcaptury CAPTURY_INCLUDES CAPTURY_LINK_DIR CAPTURY_LDFLAGS CAPTURY_CFLAGS) + if( CAPTURY_LDFLAGS ) + SET( CAPTURY_FOUND TRUE ) + endif( CAPTURY_LDFLAGS ) + macro_bool_to_01( CAPTURY_FOUND HAVE_CAPTURY ) + if( HAVE_CAPTURY ) + KWIN4_ADD_EFFECT(videorecord videorecord.cpp) + target_link_libraries(kwin4_effect_videorecord ${CAPTURY_LDFLAGS}) + install( FILES videorecord.desktop DESTINATION ${DATA_INSTALL_DIR}/kwin/effects ) + endif( HAVE_CAPTURY ) endif(OPENGL_FOUND) if (X11_Xrender_FOUND) @@ -41,4 +53,6 @@ KWIN4_ADD_EFFECT(builtins ${kwin4_effect_builtins_sources}) install( FILES presentwindows.desktop diminactive.desktop + zoom.desktop DESTINATION ${DATA_INSTALL_DIR}/kwin/effects ) + diff --git a/effects/videorecord.cpp b/effects/videorecord.cpp index 7b457ea7fe..bfcb100a35 100644 --- a/effects/videorecord.cpp +++ b/effects/videorecord.cpp @@ -39,8 +39,6 @@ License. See the file "COPYING" for the exact licensing terms. #include #include -#include - #include namespace KWin @@ -117,7 +115,7 @@ void VideoRecordEffect::startRecording() kDebug( 1212 ) << "Video recording file open failed" << endl; return; } - workspace()->addRepaintFull(); // trigger reading initial screen contents into buffer + effects->addRepaintFull(); // trigger reading initial screen contents into buffer kDebug( 1212 ) << "Video recording start" << endl; } diff --git a/effects/videorecord.desktop b/effects/videorecord.desktop new file mode 100644 index 0000000000..da28b1f411 --- /dev/null +++ b/effects/videorecord.desktop @@ -0,0 +1,4 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=Videorecord +X-KDE-Library=kwin4_effect_videorecord diff --git a/effects/videorecord.h b/effects/videorecord.h index e2bc5879c0..3bcccf65dd 100644 --- a/effects/videorecord.h +++ b/effects/videorecord.h @@ -11,7 +11,7 @@ License. See the file "COPYING" for the exact licensing terms. #ifndef KWIN_VIDEO_H #define KWIN_VIDEO_H -#include +#include #include diff --git a/effects/zoom.cpp b/effects/zoom.cpp index 3f5344f310..62822519ce 100644 --- a/effects/zoom.cpp +++ b/effects/zoom.cpp @@ -10,8 +10,6 @@ License. See the file "COPYING" for the exact licensing terms. #include "zoom.h" -#include - namespace KWin { @@ -32,7 +30,7 @@ void ZoomEffect::prePaintScreen( int* mask, QRegion* region, int time ) zoom = qMax( zoom - diff, target_zoom ); } if( zoom != 1.0 ) - *mask |= Scene::PAINT_SCREEN_TRANSFORMED; + *mask |= PAINT_SCREEN_TRANSFORMED; effects->prePaintScreen( mask, region, time ); } @@ -53,7 +51,7 @@ void ZoomEffect::paintScreen( int mask, QRegion region, ScreenPaintData& data ) void ZoomEffect::postPaintScreen() { if( zoom != target_zoom ) - workspace()->addRepaintFull(); + effects->addRepaintFull(); effects->postPaintScreen(); } diff --git a/effects/zoom.desktop b/effects/zoom.desktop new file mode 100644 index 0000000000..3161fc106e --- /dev/null +++ b/effects/zoom.desktop @@ -0,0 +1,4 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=Zoom +X-KDE-Library=kwin4_effect_builtins diff --git a/effects/zoom.h b/effects/zoom.h index 1620381744..61723a9e1c 100644 --- a/effects/zoom.h +++ b/effects/zoom.h @@ -11,7 +11,7 @@ License. See the file "COPYING" for the exact licensing terms. #ifndef KWIN_ZOOM_H #define KWIN_ZOOM_H -#include +#include namespace KWin {