OSDN Git Service

kwin: make the builtin effects really builtin
authorIvailo Monev <xakepa10@laimg.moc>
Thu, 8 Sep 2016 00:51:09 +0000 (00:51 +0000)
committerIvailo Monev <xakepa10@laimg.moc>
Thu, 8 Sep 2016 00:51:09 +0000 (00:51 +0000)
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
54 files changed:
kwin/CMakeLists.txt
kwin/effects.cpp
kwin/effects/CMakeLists.txt [deleted file]
kwin/effects/dashboard/CMakeLists.txt
kwin/effects/dashboard/dashboard.desktop
kwin/effects/diminactive/CMakeLists.txt
kwin/effects/diminactive/diminactive.desktop
kwin/effects/dimscreen/CMakeLists.txt
kwin/effects/dimscreen/dimscreen.desktop
kwin/effects/highlightwindow/CMakeLists.txt
kwin/effects/highlightwindow/highlightwindow.desktop
kwin/effects/kscreen/CMakeLists.txt
kwin/effects/kscreen/kscreen.desktop
kwin/effects/logout/CMakeLists.txt
kwin/effects/logout/logout.desktop
kwin/effects/magnifier/CMakeLists.txt
kwin/effects/magnifier/magnifier.cpp
kwin/effects/magnifier/magnifier.desktop
kwin/effects/magnifier/magnifier.h
kwin/effects/minimizeanimation/CMakeLists.txt
kwin/effects/minimizeanimation/minimizeanimation.desktop
kwin/effects/mousemark/CMakeLists.txt
kwin/effects/mousemark/mousemark.desktop
kwin/effects/presentwindows/CMakeLists.txt
kwin/effects/presentwindows/presentwindows.desktop
kwin/effects/resize/CMakeLists.txt
kwin/effects/resize/resize.desktop
kwin/effects/screenedge/CMakeLists.txt
kwin/effects/screenedge/screenedgeeffect.desktop
kwin/effects/showfps/CMakeLists.txt
kwin/effects/showfps/showfps.desktop
kwin/effects/showpaint/CMakeLists.txt
kwin/effects/showpaint/showpaint.desktop
kwin/effects/slide/CMakeLists.txt
kwin/effects/slide/slide.desktop
kwin/effects/slideback/CMakeLists.txt
kwin/effects/slideback/slideback.desktop
kwin/effects/slidingpopups/CMakeLists.txt
kwin/effects/slidingpopups/slidingpopups.desktop
kwin/effects/snaphelper/CMakeLists.txt
kwin/effects/snaphelper/snaphelper.desktop
kwin/effects/taskbarthumbnail/CMakeLists.txt
kwin/effects/taskbarthumbnail/taskbarthumbnail.desktop
kwin/effects/thumbnailaside/CMakeLists.txt
kwin/effects/thumbnailaside/thumbnailaside.desktop
kwin/effects/trackmouse/CMakeLists.txt
kwin/effects/trackmouse/trackmouse.desktop
kwin/effects/windowgeometry/CMakeLists.txt
kwin/effects/windowgeometry/windowgeometry.cpp
kwin/effects/windowgeometry/windowgeometry.desktop
kwin/effects/windowgeometry/windowgeometry.h
kwin/effects/zoom/CMakeLists.txt
kwin/effects/zoom/zoom.desktop
kwin/libkwineffects/kwineffects.h

index f16f7fa..251ff8a 100644 (file)
@@ -31,10 +31,45 @@ if(KWIN_BUILD_KCMS)
 endif()
 
 add_subdirectory( clients )
-add_subdirectory( effects )
 add_subdirectory( tabbox )
 
 
+# Install the KWin/Effect service type
+install(FILES effects/kwineffect.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR})
+
+# Create initial variables
+set(kwin4_effect_builtins_sources)
+set(kwin4_effect_builtins_config_sources effects/configs_builtins.cpp)
+set(kwin4_effect_include_directories)
+
+include( effects/kscreen/CMakeLists.txt )
+include( effects/presentwindows/CMakeLists.txt )
+include( effects/screenedge/CMakeLists.txt )
+include( effects/slidingpopups/CMakeLists.txt )
+include( effects/taskbarthumbnail/CMakeLists.txt )
+include( effects/dashboard/CMakeLists.txt )
+include( effects/diminactive/CMakeLists.txt )
+include( effects/dimscreen/CMakeLists.txt )
+include( effects/highlightwindow/CMakeLists.txt )
+include( effects/minimizeanimation/CMakeLists.txt )
+include( effects/resize/CMakeLists.txt )
+include( effects/showfps/CMakeLists.txt )
+include( effects/showpaint/CMakeLists.txt )
+include( effects/slide/CMakeLists.txt )
+include( effects/slideback/CMakeLists.txt )
+include( effects/thumbnailaside/CMakeLists.txt )
+include( effects/windowgeometry/CMakeLists.txt )
+include( effects/zoom/CMakeLists.txt )
+include( effects/logout/CMakeLists.txt )
+include( effects/magnifier/CMakeLists.txt )
+include( effects/mousemark/CMakeLists.txt )
+include( effects/snaphelper/CMakeLists.txt )
+include( effects/trackmouse/CMakeLists.txt )
+
+kde4_add_plugin(kcm_kwin4_effect_builtins ${kwin4_effect_builtins_config_sources})
+target_link_libraries(kcm_kwin4_effect_builtins kwineffects ${KDE4_KIO_LIBS} ${KDE4_KDEUI_LIBS})
+install(TARGETS kcm_kwin4_effect_builtins DESTINATION ${PLUGIN_INSTALL_DIR})
+
 ########### next target ###############
 
 set(kwin_SRCS
@@ -130,7 +165,7 @@ if (NOT X11_xf86vmode_FOUND)
     add_definitions(-DKWIN_NO_XF86VM)
 endif()
 
-add_executable(kwin ${kwin_SRCS})
+add_executable(kwin ${kwin_SRCS} ${kwin4_effect_builtins_sources})
 
 target_link_libraries(kwin
     ${KDE4_KDEUI_LIBS}
index d5cbb4a..5554c62 100644 (file)
@@ -66,6 +66,29 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 // dbus generated
 #include "screenlocker_interface.h"
 
+#include "effects/dashboard/dashboard.h"
+#include "effects/diminactive/diminactive.h"
+#include "effects/dimscreen/dimscreen.h"
+#include "effects/highlightwindow/highlightwindow.h"
+#include "effects/kscreen/kscreen.h"
+#include "effects/logout/logout.h"
+#include "effects/magnifier/magnifier.h"
+#include "effects/minimizeanimation/minimizeanimation.h"
+#include "effects/mousemark/mousemark.h"
+#include "effects/presentwindows/presentwindows.h"
+#include "effects/resize/resize.h"
+#include "effects/screenedge/screenedgeeffect.h"
+#include "effects/showfps/showfps.h"
+#include "effects/showpaint/showpaint.h"
+#include "effects/slide/slide.h"
+#include "effects/slideback/slideback.h"
+#include "effects/slidingpopups/slidingpopups.h"
+#include "effects/snaphelper/snaphelper.h"
+#include "effects/taskbarthumbnail/taskbarthumbnail.h"
+#include "effects/thumbnailaside/thumbnailaside.h"
+#include "effects/trackmouse/trackmouse.h"
+#include "effects/windowgeometry/windowgeometry.h"
+#include "effects/zoom/zoom.h"
 
 namespace KWin
 {
@@ -1351,85 +1374,153 @@ bool EffectsHandlerImpl::loadEffect(const QString& name, bool checkDefault)
     }
     KService::Ptr service = offers.first();
 
-    QLibrary* library = findEffectLibrary(service.data());
-    if (!library) {
-        return false;
-    }
+    Effect* effect = 0;
+    QLibrary* library = 0;
+    // builtins first
+    if (internalname == "kwin4_effect_kscreen") {
+        effect = new KscreenEffect();
+    } else if (internalname == "kwin4_effect_presentwindows") {
+        effect = new PresentWindowsEffect();
+    } else if (internalname == "kwin4_effect_screenedge") {
+        effect = new ScreenEdgeEffect();
+    } else if (internalname == "kwin4_effect_slidingpopups") {
+        effect = new SlidingPopupsEffect();
+    } else if (internalname == "kwin4_effect_taskbarthumbnail") {
+        effect = new TaskbarThumbnailEffect();
+    } else if (internalname == "kwin4_effect_dashboard") {
+        effect = new DashboardEffect();
+    } else if (internalname == "kwin4_effect_diminactive") {
+        effect = new DimInactiveEffect();
+    } else if (internalname == "kwin4_effect_dimscreen") {
+        effect = new DimScreenEffect();
+    } else if (internalname == "kwin4_effect_highlightwindow") {
+        effect = new HighlightWindowEffect();
+    } else if (internalname == "kwin4_effect_minimizeanimation") {
+        effect = new MinimizeAnimationEffect();
+    } else if (internalname == "kwin4_effect_resize") {
+        effect = new ResizeEffect();
+    } else if (internalname == "kwin4_effect_showfps") {
+        effect = new ShowFpsEffect();
+    } else if (internalname == "kwin4_effect_showpaint") {
+        effect = new ShowPaintEffect();
+    } else if (internalname == "kwin4_effect_slide") {
+        effect = new SlideEffect();
+    } else if (internalname == "kwin4_effect_slideback") {
+        effect = new SlideBackEffect();
+    } else if (internalname == "kwin4_effect_thumbnailaside") {
+        effect = new ThumbnailAsideEffect();
+    } else if (internalname == "kwin4_effect_windowgeometry") {
+        effect = new WindowGeometryEffect();
+    } else if (internalname == "kwin4_effect_zoom") {
+        effect = new ZoomEffect();
+    } else if (internalname == "kwin4_effect_logout") {
+        effect = new LogoutEffect();
+    } else if (internalname == "kwin4_effect_magnifier") {
+        effect = new MagnifierEffect();
+    } else if (internalname == "kwin4_effect_mousemark") {
+        effect = new MouseMarkEffect();
+    } else if (internalname == "kwin4_effect_snaphelper") {
+        effect = new SnapHelperEffect();
+    } else if (internalname == "kwin4_effect_trackmouse") {
+        effect = new TrackMouseEffect();
+    }
+
+    if (effect) {
+        kDebug(1212) << "Effect is internal" << name;
+        bool enabledByDefault = service->property("X-KDE-PluginInfo-EnabledByDefault").toBool();
+        if (checkDefault && !enabledByDefault) {
+            delete effect;
+            return false;
+        }
+    // external second
+    } else {
+        kDebug(1212) << "Effect is external" << name;
+        library = findEffectLibrary(service.data());
+        if (!library) {
+            return false;
+        }
 
-    QString version_symbol = "effect_version_" + name;
-    void *version_func = library->resolve(version_symbol.toAscii());
-    if (version_func == NULL) {
-        kWarning(1212) << "Effect " << name << " does not provide required API version, ignoring.";
-        delete library;
-        return false;
-    }
-    typedef int (*t_versionfunc)();
-    int version = reinterpret_cast< t_versionfunc >(version_func)();   // call it
-    // Version must be the same or less, but major must be the same.
-    // With major 0 minor must match exactly.
-    if (version > KWIN_EFFECT_API_VERSION
-            || (version >> 8) != KWIN_EFFECT_API_VERSION_MAJOR
-            || (KWIN_EFFECT_API_VERSION_MAJOR == 0 && version != KWIN_EFFECT_API_VERSION)) {
-        kWarning(1212) << "Effect " << name << " requires unsupported API version " << version;
-        delete library;
-        return false;
-    }
+        QString version_symbol = "effect_version_" + name;
+        void *version_func = library->resolve(version_symbol.toAscii());
+        if (version_func == NULL) {
+            kWarning(1212) << "Effect " << name << " does not provide required API version, ignoring.";
+            delete library;
+            return false;
+        }
+        typedef int (*t_versionfunc)();
+        int version = reinterpret_cast< t_versionfunc >(version_func)();   // call it
+        // Version must be the same or less, but major must be the same.
+        // With major 0 minor must match exactly.
+        if (version > KWIN_EFFECT_API_VERSION
+                || (version >> 8) != KWIN_EFFECT_API_VERSION_MAJOR
+                || (KWIN_EFFECT_API_VERSION_MAJOR == 0 && version != KWIN_EFFECT_API_VERSION)) {
+            kWarning(1212) << "Effect " << name << " requires unsupported API version " << version;
+            delete library;
+            return false;
+        }
 
-    const QString enabledByDefault_symbol = "effect_enabledbydefault_" + name;
-    void *enabledByDefault_func = library->resolve(enabledByDefault_symbol.toAscii().data());
+        const QString enabledByDefault_symbol = "effect_enabledbydefault_" + name;
+        void *enabledByDefault_func = library->resolve(enabledByDefault_symbol.toAscii().data());
 
-    const QString supported_symbol = "effect_supported_" + name;
-    void *supported_func = library->resolve(supported_symbol.toAscii().data());
+        const QString supported_symbol = "effect_supported_" + name;
+        void *supported_func = library->resolve(supported_symbol.toAscii().data());
 
-    const QString create_symbol = "effect_create_" + name;
-    void *create_func = library->resolve(create_symbol.toAscii().data());
+        const QString create_symbol = "effect_create_" + name;
+        void *create_func = library->resolve(create_symbol.toAscii().data());
 
-    if (supported_func) {
-        typedef bool (*t_supportedfunc)();
-        t_supportedfunc supported = reinterpret_cast<t_supportedfunc>(supported_func);
-        if (!supported()) {
-            kWarning(1212) << "EffectsHandler::loadEffect : Effect " << name << " is not supported" ;
-            library->unload();
-            return false;
+        if (supported_func) {
+            typedef bool (*t_supportedfunc)();
+            t_supportedfunc supported = reinterpret_cast<t_supportedfunc>(supported_func);
+            if (!supported()) {
+                kWarning(1212) << "EffectsHandler::loadEffect : Effect " << name << " is not supported" ;
+                library->unload();
+                return false;
+            }
         }
-    }
 
-    if (checkDefault && enabledByDefault_func) {
-        typedef bool (*t_enabledByDefaultfunc)();
-        t_enabledByDefaultfunc enabledByDefault = reinterpret_cast<t_enabledByDefaultfunc>(enabledByDefault_func);
+        if (checkDefault && enabledByDefault_func) {
+            typedef bool (*t_enabledByDefaultfunc)();
+            t_enabledByDefaultfunc enabledByDefault = reinterpret_cast<t_enabledByDefaultfunc>(enabledByDefault_func);
 
-        if (!enabledByDefault()) {
+            if (!enabledByDefault()) {
+                library->unload();
+                return false;
+            }
+        }
+
+        if (!create_func) {
+            kError(1212) << "EffectsHandler::loadEffect : effect_create function not found" << endl;
             library->unload();
             return false;
         }
-    }
 
-    if (!create_func) {
-        kError(1212) << "EffectsHandler::loadEffect : effect_create function not found" << endl;
-        library->unload();
-        return false;
-    }
+        typedef Effect*(*t_createfunc)();
+        t_createfunc create = reinterpret_cast<t_createfunc>(create_func);
 
-    typedef Effect*(*t_createfunc)();
-    t_createfunc create = reinterpret_cast<t_createfunc>(create_func);
-
-    // Make sure all depenedencies have been loaded
-    // TODO: detect circular deps
-    KPluginInfo plugininfo(service);
-    QStringList dependencies = plugininfo.dependencies();
-    foreach (const QString & depName, dependencies) {
-        if (!loadEffect(depName)) {
-            kError(1212) << "EffectsHandler::loadEffect : Couldn't load dependencies for effect " << name << endl;
-            library->unload();
-            return false;
+        // Make sure all depenedencies have been loaded
+        // TODO: detect circular deps
+        KPluginInfo plugininfo(service);
+        QStringList dependencies = plugininfo.dependencies();
+        foreach (const QString & depName, dependencies) {
+            if (!loadEffect(depName)) {
+                kError(1212) << "EffectsHandler::loadEffect : Couldn't load dependencies for effect " << name << endl;
+                library->unload();
+                return false;
+            }
         }
-    }
 
-    Effect* e = create();
+        effect = create();
+    }
 
-    effect_order.insert(service->property("X-KDE-Ordering").toInt(), EffectPair(name, e));
+    effect_order.insert(service->property("X-KDE-Ordering").toInt(), EffectPair(name, effect));
     effectsChanged();
-    effect_libraries[ name ] = library;
+    if (effect) {
+        kDebug(1212) << "Internal effect has been loaded" << name;
+        effect_factories[ name ] = effect;
+    } else if (library) {
+        kDebug(1212) << "External effect has been loaded" << name;
+        effect_libraries[ name ] = library;
+    }
 
     return true;
 }
@@ -1453,7 +1544,9 @@ void EffectsHandlerImpl::unloadEffect(const QString& name)
             delete it.value().second;
             effect_order.remove(it.key());
             effectsChanged();
-            if (effect_libraries.contains(name)) {
+            if (effect_factories.contains(name)) {
+                delete effect_libraries[ name ];
+            } else if (effect_libraries.contains(name)) {
                 effect_libraries[ name ]->unload();
             }
             return;
diff --git a/kwin/effects/CMakeLists.txt b/kwin/effects/CMakeLists.txt
deleted file mode 100644 (file)
index 4eb067b..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-set(kwin_effect_OWN_LIBS
-    kwineffects
-)
-
-set(kwin_effect_KDE_LIBS
-    ${KDE4_KDEUI_LIBS}
-    ${KDE4_PLASMA_LIBS}
-    ${KDE4_KDECLARATIVE_LIBS}
-)
-
-set(kwin_effect_QT_LIBS
-    ${QT_QTDECLARATIVE_LIBRARY}
-)
-
-set(kwin_effect_XLIB_LIBS
-    ${X11_X11_LIB}
-    ${X11_Xcursor_LIB}
-)
-
-set(kwin_effect_XCB_LIBS
-    ${XCB_XCB_LIBRARIES}
-    ${X11_XCB_LIBRARIES}
-    ${XCB_IMAGE_LIBRARIES}
-    ${XCB_XFIXES_LIBRARIES}
-)
-
-if(KWIN_BUILD_COMPOSITE )
-    set(kwin_effect_XCB_LIBS ${kwin_effect_XCB_LIBS} ${XCB_RENDER_LIBRARIES})
-endif()
-
-macro(KWIN4_ADD_EFFECT_BACKEND name)
-    kde4_add_plugin(${name} ${ARGN})
-    target_link_libraries(${name}
-        ${kwin_effect_OWN_LIBS} ${kwin_effect_KDE_LIBS}
-        ${kwin_effect_QT_LIBS} ${kwin_effect_XLIB_LIBS}
-        ${kwin_effect_XCB_LIBS}
-    )
-endmacro()
-
-# Adds effect plugin with given name. Sources are given after the name
-macro( KWIN4_ADD_EFFECT name )
-    KWIN4_ADD_EFFECT_BACKEND(kwin4_effect_${name} ${ARGN})
-    install( TARGETS kwin4_effect_${name} DESTINATION ${PLUGIN_INSTALL_DIR})
-endmacro()
-
-macro( KWIN4_ADD_EFFECT_CONFIG name )
-    kde4_add_plugin(kcm_kwin4_effect_${name} ${ARGN})
-    target_link_libraries(kcm_kwin4_effect_${name} kwineffects ${KDE4_KIO_LIBS} ${KDE4_KDEUI_LIBS})
-    install(TARGETS kcm_kwin4_effect_${name} DESTINATION ${PLUGIN_INSTALL_DIR})
-endmacro()
-
-# Install the KWin/Effect service type
-install(FILES kwineffect.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR})
-
-# Create initial variables
-set(kwin4_effect_builtins_sources)
-set(kwin4_effect_builtins_config_sources configs_builtins.cpp)
-set(kwin4_effect_include_directories)
-
-###############################################################################
-# Built-in effects go here
-
-# Common effects
-include( kscreen/CMakeLists.txt )
-include( presentwindows/CMakeLists.txt )
-include( screenedge/CMakeLists.txt )
-include( slidingpopups/CMakeLists.txt )
-include( taskbarthumbnail/CMakeLists.txt )
-
-# Common effects only relevant to desktop
-include( dashboard/CMakeLists.txt )
-include( diminactive/CMakeLists.txt )
-include( dimscreen/CMakeLists.txt )
-include( highlightwindow/CMakeLists.txt )
-include( minimizeanimation/CMakeLists.txt )
-include( resize/CMakeLists.txt )
-include( showfps/CMakeLists.txt )
-include( showpaint/CMakeLists.txt )
-include( slide/CMakeLists.txt )
-include( slideback/CMakeLists.txt )
-include( thumbnailaside/CMakeLists.txt )
-include( windowgeometry/CMakeLists.txt )
-include( zoom/CMakeLists.txt )
-include( logout/CMakeLists.txt )
-include( magnifier/CMakeLists.txt )
-include( mousemark/CMakeLists.txt )
-include( snaphelper/CMakeLists.txt )
-include( trackmouse/CMakeLists.txt )
-
-###############################################################################
-
-# Add the builtins plugin
-KWIN4_ADD_EFFECT( builtins ${kwin4_effect_builtins_sources} )
-KWIN4_ADD_EFFECT_CONFIG( builtins ${kwin4_effect_builtins_config_sources} )
index 54e8c47..f9b6629 100644 (file)
@@ -2,27 +2,26 @@
 # Effect
 
 # Source files
-set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
-     dashboard/dashboard.cpp
-     dashboard/dashboard.cpp )
+set(kwin4_effect_builtins_sources
+    ${kwin4_effect_builtins_sources}
+     effects/dashboard/dashboard.cpp
+     effects/dashboard/dashboard.cpp
+)
 
-kde4_add_kcfg_files(kwin4_effect_builtins_sources dashboard/dashboardconfig.kcfgc)
+kde4_add_kcfg_files(kwin4_effect_builtins_sources effects/dashboard/dashboardconfig.kcfgc)
 
 # .desktop files
-install( FILES
-         dashboard/dashboard.desktop
-         DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/dashboard/dashboard.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
 
 #######################################
 # Config
 
 # Source files
-set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources}
-     dashboard/dashboard_config.cpp
-     dashboard/dashboard_config.ui )
+set(kwin4_effect_builtins_config_sources
+    ${kwin4_effect_builtins_config_sources}
+    effects/dashboard/dashboard_config.cpp
+)
 
-kde4_add_kcfg_files(kwin4_effect_builtins_config_sources dashboard/dashboardconfig.kcfgc)
+kde4_add_kcfg_files(kwin4_effect_builtins_config_sources effects/dashboard/dashboardconfig.kcfgc)
 
-install( FILES
-         dashboard/dashboard_config.desktop
-         DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/dashboard/dashboard_config.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
index a804f89..8f65f7f 100644 (file)
@@ -141,5 +141,4 @@ X-KDE-PluginInfo-Category=Appearance
 X-KDE-PluginInfo-Depends=
 X-KDE-PluginInfo-License=GPL
 X-KDE-PluginInfo-EnabledByDefault=true
-X-KDE-Library=kwin4_effect_builtins
 X-KDE-Ordering=85
index 1ce7bca..9fd010c 100644 (file)
@@ -2,29 +2,26 @@
 # Effect
 
 # Source files
-set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
-    diminactive/diminactive.cpp
-    )
+set(kwin4_effect_builtins_sources
+    ${kwin4_effect_builtins_sources}
+    effects/diminactive/diminactive.cpp
+)
 
-kde4_add_kcfg_files(kwin4_effect_builtins_sources diminactive/diminactiveconfig.kcfgc)
+kde4_add_kcfg_files(kwin4_effect_builtins_sources effects/diminactive/diminactiveconfig.kcfgc)
 
 # .desktop files
-install( FILES
-    diminactive/diminactive.desktop
-    DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/diminactive/diminactive.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
 
 #######################################
 # Config
 
 # Source files
-set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources}
-    diminactive/diminactive_config.cpp
-    diminactive/diminactive_config.ui
-    )
+set(kwin4_effect_builtins_config_sources
+    ${kwin4_effect_builtins_config_sources}
+    effects/diminactive/diminactive_config.cpp
+)
 
-kde4_add_kcfg_files(kwin4_effect_builtins_config_sources diminactive/diminactiveconfig.kcfgc)
+kde4_add_kcfg_files(kwin4_effect_builtins_config_sources effects/diminactive/diminactiveconfig.kcfgc)
 
 # .desktop files
-install( FILES
-    diminactive/diminactive_config.desktop
-    DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/diminactive/diminactive_config.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
index 5fcb05a..826859a 100644 (file)
@@ -156,5 +156,4 @@ X-KDE-PluginInfo-Category=Focus
 X-KDE-PluginInfo-Depends=
 X-KDE-PluginInfo-License=GPL
 X-KDE-PluginInfo-EnabledByDefault=false
-X-KDE-Library=kwin4_effect_builtins
 X-KDE-Ordering=50
index 0373e91..6ffd72d 100644 (file)
@@ -2,11 +2,10 @@
 # Effect
 
 # Source files
-set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
-    dimscreen/dimscreen.cpp
-    )
+set(kwin4_effect_builtins_sources
+    ${kwin4_effect_builtins_sources}
+    effects/dimscreen/dimscreen.cpp
+)
 
 # .desktop files
-install( FILES
-    dimscreen/dimscreen.desktop
-    DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/dimscreen/dimscreen.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
index 4abfbd4..07cf83f 100644 (file)
@@ -146,5 +146,4 @@ X-KDE-PluginInfo-Category=Focus
 X-KDE-PluginInfo-Depends=
 X-KDE-PluginInfo-License=GPL
 X-KDE-PluginInfo-EnabledByDefault=false
-X-KDE-Library=kwin4_effect_builtins
 X-Ordering=50
index c770e54..54bd290 100644 (file)
@@ -2,11 +2,10 @@
 # Effect
 
 # Source files
-set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
-    highlightwindow/highlightwindow.cpp
-    )
+set(kwin4_effect_builtins_sources
+    ${kwin4_effect_builtins_sources}
+    effects/highlightwindow/highlightwindow.cpp
+)
 
 # .desktop files
-install( FILES
-    highlightwindow/highlightwindow.desktop
-    DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/highlightwindow/highlightwindow.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
index 8c6d057..e6b8b02 100644 (file)
@@ -141,4 +141,3 @@ X-KDE-PluginInfo-Depends=
 X-KDE-PluginInfo-License=GPL
 X-KDE-PluginInfo-EnabledByDefault=true
 X-KDE-Ordering=70
-X-KDE-Library=kwin4_effect_builtins
index 9f2aec0..5f71b80 100644 (file)
@@ -2,13 +2,12 @@
 # Effect
 
 # Source files
-set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
-     kscreen/kscreen.cpp
+set(kwin4_effect_builtins_sources
+    ${kwin4_effect_builtins_sources}
+     effects/kscreen/kscreen.cpp
 )
 
-kde4_add_kcfg_files(kwin4_effect_builtins_sources kscreen/kscreenconfig.kcfgc)
+kde4_add_kcfg_files(kwin4_effect_builtins_sources effects/kscreen/kscreenconfig.kcfgc)
 
 # .desktop files
-install( FILES
-         kscreen/kscreen.desktop
-         DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/kscreen/kscreen.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
index 0d5306d..f7c5bbc 100644 (file)
@@ -89,6 +89,5 @@ X-KDE-PluginInfo-Category=Appearance
 X-KDE-PluginInfo-Depends=
 X-KDE-PluginInfo-License=GPL
 X-KDE-PluginInfo-EnabledByDefault=true
-X-KDE-Library=kwin4_effect_builtins
 X-KDE-Ordering=99
 X-KWin-Requires-Shaders=false
index 635fdba..1fabb2d 100644 (file)
@@ -2,14 +2,12 @@
 # Effect
 
 # Source files
-set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
-    logout/logout.cpp
+set(kwin4_effect_builtins_sources
+    ${kwin4_effect_builtins_sources}
+    effects/logout/logout.cpp
 )
 
-kde4_add_kcfg_files(kwin4_effect_builtins_sources logout/logoutconfig.kcfgc)
+kde4_add_kcfg_files(kwin4_effect_builtins_sources effects/logout/logoutconfig.kcfgc)
 
 # .desktop files
-install( FILES
-    logout/logout.desktop
-    DESTINATION ${SERVICES_INSTALL_DIR}/kwin
-)
+install(FILES effects/logout/logout.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
index 5c938e1..298f9cc 100644 (file)
@@ -160,5 +160,4 @@ X-KDE-PluginInfo-Category=Appearance
 X-KDE-PluginInfo-Depends=
 X-KDE-PluginInfo-License=GPL
 X-KDE-PluginInfo-EnabledByDefault=true
-X-KDE-Library=kwin4_effect_builtins
 X-KDE-Ordering=85
index 79a308f..e031383 100644 (file)
@@ -2,28 +2,25 @@
 # Effect
 
 # Source files
-set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
-    magnifier/magnifier.cpp
-    )
+set(kwin4_effect_builtins_sources
+    ${kwin4_effect_builtins_sources}
+    effects/magnifier/magnifier.cpp
+)
 
-kde4_add_kcfg_files(kwin4_effect_builtins_sources magnifier/magnifierconfig.kcfgc)
+kde4_add_kcfg_files(kwin4_effect_builtins_sources effects/magnifier/magnifierconfig.kcfgc)
 
 # .desktop files
-install( FILES
-    magnifier/magnifier.desktop
-    DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/magnifier/magnifier.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
 
 #######################################
 # Config
 
 # Source files
-set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources}
-    magnifier/magnifier_config.cpp
-    magnifier/magnifier_config.ui
-    )
-kde4_add_kcfg_files(kwin4_effect_builtins_config_sources magnifier/magnifierconfig.kcfgc)
+set(kwin4_effect_builtins_config_sources
+    ${kwin4_effect_builtins_config_sources}
+    effects/magnifier/magnifier_config.cpp
+)
+kde4_add_kcfg_files(kwin4_effect_builtins_config_sources effects/magnifier/magnifierconfig.kcfgc)
 
 # .desktop files
-install( FILES
-    magnifier/magnifier_config.desktop
-    DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/magnifier/magnifier_config.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
index a748bf6..1530cec 100644 (file)
@@ -39,7 +39,6 @@ namespace KWin
 {
 
 KWIN_EFFECT(magnifier, MagnifierEffect)
-KWIN_EFFECT_SUPPORTED(magnifier, MagnifierEffect::supported())
 
 const int FRAME_WIDTH = 5;
 
@@ -87,11 +86,6 @@ void MagnifierEffect::destroyPixmap()
 #endif
 }
 
-bool MagnifierEffect::supported()
-{
-    return  effects->compositingType() == XRenderCompositing;
-}
-
 void MagnifierEffect::reconfigure(ReconfigureFlags)
 {
     MagnifierConfig::self()->readConfig();
index d8ee9c0..2440a0b 100644 (file)
@@ -163,4 +163,3 @@ X-KDE-PluginInfo-Category=Accessibility
 X-KDE-PluginInfo-Depends=
 X-KDE-PluginInfo-License=GPL
 X-KDE-PluginInfo-EnabledByDefault=false
-X-KDE-Library=kwin4_effect_builtins
index 823af31..abd5ccf 100644 (file)
@@ -45,7 +45,6 @@ public:
     virtual void paintScreen(int mask, QRegion region, ScreenPaintData& data);
     virtual void postPaintScreen();
     virtual bool isActive() const;
-    static bool supported();
 
     // for properties
     QSize magnifierSize() const {
index e9535d0..4e68ddf 100644 (file)
@@ -2,11 +2,10 @@
 # Effect
 
 # Source files
-set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
-    minimizeanimation/minimizeanimation.cpp
-    )
+set(kwin4_effect_builtins_sources
+    ${kwin4_effect_builtins_sources}
+    effects/minimizeanimation/minimizeanimation.cpp
+)
 
 # .desktop files
-install( FILES
-    minimizeanimation/minimizeanimation.desktop
-    DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/minimizeanimation/minimizeanimation.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
index baf42fd..80516a2 100644 (file)
@@ -156,5 +156,4 @@ X-KDE-PluginInfo-Category=Appearance
 X-KDE-PluginInfo-Depends=
 X-KDE-PluginInfo-License=GPL
 X-KDE-PluginInfo-EnabledByDefault=true
-X-KDE-Library=kwin4_effect_builtins
 X-KDE-Ordering=50
index 5e6f368..a049bc2 100644 (file)
@@ -2,29 +2,26 @@
 # Effect
 
 # Source files
-set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
-    mousemark/mousemark.cpp
-    )
+set(kwin4_effect_builtins_sources
+    ${kwin4_effect_builtins_sources}
+    effects/mousemark/mousemark.cpp
+)
 
-kde4_add_kcfg_files(kwin4_effect_builtins_sources mousemark/mousemarkconfig.kcfgc)
+kde4_add_kcfg_files(kwin4_effect_builtins_sources effects/mousemark/mousemarkconfig.kcfgc)
 
 # .desktop files
-install( FILES
-    mousemark/mousemark.desktop
-    DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/mousemark/mousemark.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
 
 #######################################
 # Config
 
 # Source files
-set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources}
-    mousemark/mousemark_config.cpp
-    mousemark/mousemark_config.ui
-    )
+set(kwin4_effect_builtins_config_sources
+    ${kwin4_effect_builtins_config_sources}
+    effects/mousemark/mousemark_config.cpp
+)
 
-kde4_add_kcfg_files(kwin4_effect_builtins_config_sources mousemark/mousemarkconfig.kcfgc)
+kde4_add_kcfg_files(kwin4_effect_builtins_config_sources effects/mousemark/mousemarkconfig.kcfgc)
 
 # .desktop files
-install( FILES
-    mousemark/mousemark_config.desktop
-    DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/mousemark/mousemark_config.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
index beb51b5..b0d1ec3 100644 (file)
@@ -159,4 +159,3 @@ X-KDE-PluginInfo-Category=Appearance
 X-KDE-PluginInfo-Depends=
 X-KDE-PluginInfo-License=GPL
 X-KDE-PluginInfo-EnabledByDefault=false
-X-KDE-Library=kwin4_effect_builtins
index 94f6236..1c7ccea 100644 (file)
@@ -2,34 +2,28 @@
 # Effect
 
 # Source files
-set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
-    presentwindows/presentwindows.cpp
-    presentwindows/presentwindows_proxy.cpp
-    )
+set(kwin4_effect_builtins_sources
+    ${kwin4_effect_builtins_sources}
+    effects/presentwindows/presentwindows.cpp
+    effects/presentwindows/presentwindows_proxy.cpp
+)
 
-kde4_add_kcfg_files(kwin4_effect_builtins_sources presentwindows/presentwindowsconfig.kcfgc)
+kde4_add_kcfg_files(kwin4_effect_builtins_sources effects/presentwindows/presentwindowsconfig.kcfgc)
 
 # .desktop files
-install( FILES
-    presentwindows/presentwindows.desktop
-    DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
-install( FILES
-    presentwindows/main.qml
-    DESTINATION ${DATA_INSTALL_DIR}/kwin/effects/presentwindows/
-)
+install(FILES effects/presentwindows/presentwindows.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
+install(FILES effects/presentwindows/main.qml DESTINATION ${DATA_INSTALL_DIR}/kwin/effects/presentwindows)
 
 #######################################
 # Config
 
 # Source files
-set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources}
-    presentwindows/presentwindows_config.cpp
-    presentwindows/presentwindows_config.ui
-    )
+set(kwin4_effect_builtins_config_sources
+    ${kwin4_effect_builtins_config_sources}
+    effects/presentwindows/presentwindows_config.cpp
+)
 
-kde4_add_kcfg_files(kwin4_effect_builtins_config_sources presentwindows/presentwindowsconfig.kcfgc)
+kde4_add_kcfg_files(kwin4_effect_builtins_config_sources effects/presentwindows/presentwindowsconfig.kcfgc)
 
 # .desktop files
-install( FILES
-    presentwindows/presentwindows_config.desktop
-    DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/presentwindows/presentwindows_config.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
index fc755bc..c77a87c 100644 (file)
@@ -155,5 +155,4 @@ X-KDE-PluginInfo-Category=Window Management
 X-KDE-PluginInfo-Depends=
 X-KDE-PluginInfo-License=GPL
 X-KDE-PluginInfo-EnabledByDefault=true
-X-KDE-Library=kwin4_effect_builtins
 X-KDE-Ordering=70
index 19af1b1..cca20b9 100644 (file)
@@ -2,28 +2,25 @@
 # Effect
 
 # Source files
-set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
-    resize/resize.cpp
-    )
+set(kwin4_effect_builtins_sources
+    ${kwin4_effect_builtins_sources}
+    effects/resize/resize.cpp
+)
 
-kde4_add_kcfg_files(kwin4_effect_builtins_sources resize/resizeconfig.kcfgc)
+kde4_add_kcfg_files(kwin4_effect_builtins_sources effects/resize/resizeconfig.kcfgc)
 
 # .desktop files
-install( FILES
-    resize/resize.desktop
-    DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/resize/resize.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
 
 #######################################
 # Config
 
 # Source files
-set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources}
-    resize/resize_config.cpp
-    resize/resize_config.ui
-    )
-kde4_add_kcfg_files(kwin4_effect_builtins_config_sources resize/resizeconfig.kcfgc)
+set(kwin4_effect_builtins_config_sources
+    ${kwin4_effect_builtins_config_sources}
+    effects/resize/resize_config.cpp
+)
+kde4_add_kcfg_files(kwin4_effect_builtins_config_sources effects/resize/resizeconfig.kcfgc)
 
 # .desktop files
-install( FILES
-    resize/resize_config.desktop
-    DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/resize/resize_config.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
index ff542dc..9f3e3c2 100644 (file)
@@ -128,5 +128,4 @@ X-KDE-PluginInfo-Category=Window Management
 X-KDE-PluginInfo-Depends=
 X-KDE-PluginInfo-License=GPL
 X-KDE-PluginInfo-EnabledByDefault=false
-X-KDE-Library=kwin4_effect_builtins
 X-KDE-Ordering=60
index 6b20571..d7ca0bd 100644 (file)
@@ -2,11 +2,10 @@
 # Effect
 
 # Source files
-set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
-    screenedge/screenedgeeffect.cpp
-    )
+set(kwin4_effect_builtins_sources
+    ${kwin4_effect_builtins_sources}
+    effects/screenedge/screenedgeeffect.cpp
+)
 
 # .desktop files
-install( FILES
-    screenedge/screenedgeeffect.desktop
-    DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/screenedge/screenedgeeffect.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
index 43fdc40..513532e 100644 (file)
@@ -92,5 +92,4 @@ X-KDE-PluginInfo-Category=Appearance
 X-KDE-PluginInfo-Depends=
 X-KDE-PluginInfo-License=GPL
 X-KDE-PluginInfo-EnabledByDefault=true
-X-KDE-Library=kwin4_effect_builtins
 X-KDE-Ordering=90
index 7e9f67c..3a0bb5e 100644 (file)
@@ -2,29 +2,26 @@
 # Effect
 
 # Source files
-set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
-    showfps/showfps.cpp
-    )
+set(kwin4_effect_builtins_sources
+    ${kwin4_effect_builtins_sources}
+    effects/showfps/showfps.cpp
+)
 
-kde4_add_kcfg_files(kwin4_effect_builtins_sources showfps/showfpsconfig.kcfgc)
+kde4_add_kcfg_files(kwin4_effect_builtins_sources effects/showfps/showfpsconfig.kcfgc)
 
 # .desktop files
-install( FILES
-    showfps/showfps.desktop
-    DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/showfps/showfps.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
 
 #######################################
 # Config
 
 # Source files
-set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources}
-    showfps/showfps_config.cpp
-    showfps/showfps_config.ui
-    )
+set(kwin4_effect_builtins_config_sources
+    ${kwin4_effect_builtins_config_sources}
+    effects/showfps/showfps_config.cpp
+)
 
-kde4_add_kcfg_files(kwin4_effect_builtins_config_sources showfps/showfpsconfig.kcfgc)
+kde4_add_kcfg_files(kwin4_effect_builtins_config_sources effects/showfps/showfpsconfig.kcfgc)
 
 # .desktop files
-install( FILES
-    showfps/showfps_config.desktop
-    DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/showfps/showfps_config.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
index 88564e9..6f15042 100644 (file)
@@ -157,4 +157,3 @@ X-KDE-PluginInfo-Category=Tools
 X-KDE-PluginInfo-Depends=
 X-KDE-PluginInfo-License=GPL
 X-KDE-PluginInfo-EnabledByDefault=false
-X-KDE-Library=kwin4_effect_builtins
index d0e5734..00e7fa8 100644 (file)
@@ -2,11 +2,10 @@
 # Effect
 
 # Source files
-set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
-    showpaint/showpaint.cpp
-    )
+set(kwin4_effect_builtins_sources
+    ${kwin4_effect_builtins_sources}
+    effects/showpaint/showpaint.cpp
+)
 
 # .desktop files
-install( FILES
-    showpaint/showpaint.desktop
-    DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/showpaint/showpaint.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
index 3b7f5bc..46212e2 100644 (file)
@@ -150,4 +150,3 @@ X-KDE-PluginInfo-Category=Tools
 X-KDE-PluginInfo-Depends=
 X-KDE-PluginInfo-License=GPL
 X-KDE-PluginInfo-EnabledByDefault=false
-X-KDE-Library=kwin4_effect_builtins
index 1547d0c..f848ede 100644 (file)
@@ -2,11 +2,10 @@
 # Effect
 
 # Source files
-set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
-    slide/slide.cpp
-    )
+set(kwin4_effect_builtins_sources
+    ${kwin4_effect_builtins_sources}
+    effects/slide/slide.cpp
+)
 
 # .desktop files
-install( FILES
-    slide/slide.desktop
-    DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/slide/slide.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
index c047cff..faa063e 100644 (file)
@@ -144,5 +144,4 @@ X-KDE-PluginInfo-Category=Appearance
 X-KDE-PluginInfo-Depends=
 X-KDE-PluginInfo-License=GPL
 X-KDE-PluginInfo-EnabledByDefault=true
-X-KDE-Library=kwin4_effect_builtins
 X-KDE-Ordering=50
index f95f9d6..158a635 100644 (file)
@@ -2,11 +2,10 @@
 # Effect
 
 # Source files
-set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
-    slideback/slideback.cpp
-    )
+set(kwin4_effect_builtins_sources
+    ${kwin4_effect_builtins_sources}
+    effects/slideback/slideback.cpp
+)
 
 # .desktop files
-install( FILES
-    slideback/slideback.desktop
-    DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/slideback/slideback.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
index 70e9882..173157a 100644 (file)
@@ -115,5 +115,4 @@ X-KDE-PluginInfo-Category=Focus
 X-KDE-PluginInfo-Depends=
 X-KDE-PluginInfo-License=GPL
 X-KDE-PluginInfo-EnabledByDefault=false
-X-KDE-Library=kwin4_effect_builtins
 X-KDE-Ordering=50
index fec1a1b..cb35374 100644 (file)
@@ -2,11 +2,10 @@
 # Effect
 
 # Source files
-set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
-    slidingpopups/slidingpopups.cpp
-    )
+set(kwin4_effect_builtins_sources
+    ${kwin4_effect_builtins_sources}
+    effects/slidingpopups/slidingpopups.cpp
+)
 
 # .desktop files
-install( FILES
-    slidingpopups/slidingpopups.desktop
-    DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/slidingpopups/slidingpopups.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
index 58b0a75..ee10a79 100644 (file)
@@ -134,5 +134,4 @@ X-KDE-PluginInfo-Category=Appearance
 X-KDE-PluginInfo-Depends=
 X-KDE-PluginInfo-License=GPL
 X-KDE-PluginInfo-EnabledByDefault=true
-X-KDE-Library=kwin4_effect_builtins
 X-KDE-Ordering=40
index b032fcd..be62601 100644 (file)
@@ -2,11 +2,10 @@
 # Effect
 
 # Source files
-set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
-    snaphelper/snaphelper.cpp
-    )
+set(kwin4_effect_builtins_sources
+    ${kwin4_effect_builtins_sources}
+    effects/snaphelper/snaphelper.cpp
+)
 
 # .desktop files
-install( FILES
-    snaphelper/snaphelper.desktop
-    DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES  effects/snaphelper/snaphelper.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
index ae9e072..d609a27 100644 (file)
@@ -138,4 +138,3 @@ X-KDE-PluginInfo-Category=Accessibility
 X-KDE-PluginInfo-Depends=
 X-KDE-PluginInfo-License=GPL
 X-KDE-PluginInfo-EnabledByDefault=false
-X-KDE-Library=kwin4_effect_builtins
index c502753..b2c872d 100644 (file)
@@ -2,11 +2,10 @@
 # Effect
 
 # Source files
-set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
-    taskbarthumbnail/taskbarthumbnail.cpp
-    )
+set(kwin4_effect_builtins_sources
+    ${kwin4_effect_builtins_sources}
+    effects/taskbarthumbnail/taskbarthumbnail.cpp
+)
 
 # .desktop files
-install( FILES
-    taskbarthumbnail/taskbarthumbnail.desktop
-    DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/taskbarthumbnail/taskbarthumbnail.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
\ No newline at end of file
index 21935fe..49b98f7 100644 (file)
@@ -155,4 +155,3 @@ X-KDE-PluginInfo-Depends=
 X-KDE-PluginInfo-License=GPL
 X-KDE-PluginInfo-EnabledByDefault=true
 X-KDE-Ordering=70
-X-KDE-Library=kwin4_effect_builtins
index 7ee2dce..26d4a2b 100644 (file)
@@ -2,29 +2,26 @@
 # Effect
 
 # Source files
-set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
-    thumbnailaside/thumbnailaside.cpp
-    )
+set(kwin4_effect_builtins_sources
+    ${kwin4_effect_builtins_sources}
+    effects/thumbnailaside/thumbnailaside.cpp
+)
 
-kde4_add_kcfg_files(kwin4_effect_builtins_sources thumbnailaside/thumbnailasideconfig.kcfgc)
+kde4_add_kcfg_files(kwin4_effect_builtins_sources effects/thumbnailaside/thumbnailasideconfig.kcfgc)
 
 # .desktop files
-install( FILES
-    thumbnailaside/thumbnailaside.desktop
-    DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/thumbnailaside/thumbnailaside.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
 
 #######################################
 # Config
 
 # Source files
-set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources}
-    thumbnailaside/thumbnailaside_config.cpp
-    thumbnailaside/thumbnailaside_config.ui
-    )
+set(kwin4_effect_builtins_config_sources
+    ${kwin4_effect_builtins_config_sources}
+    effects/thumbnailaside/thumbnailaside_config.cpp
+)
 
-kde4_add_kcfg_files(kwin4_effect_builtins_config_sources thumbnailaside/thumbnailasideconfig.kcfgc)
+kde4_add_kcfg_files(kwin4_effect_builtins_config_sources effects/thumbnailaside/thumbnailasideconfig.kcfgc)
 
 # .desktop files
-install( FILES
-    thumbnailaside/thumbnailaside_config.desktop
-    DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/thumbnailaside/thumbnailaside_config.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
index 5eb043a..254719c 100644 (file)
@@ -156,4 +156,3 @@ X-KDE-PluginInfo-Category=Appearance
 X-KDE-PluginInfo-Depends=
 X-KDE-PluginInfo-License=GPL
 X-KDE-PluginInfo-EnabledByDefault=false
-X-KDE-Library=kwin4_effect_builtins
index 937c24d..6d76703 100644 (file)
@@ -2,35 +2,33 @@
 # Effect
 
 # Source files
-set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
-    trackmouse/trackmouse.cpp
-    )
+set(kwin4_effect_builtins_sources
+    ${kwin4_effect_builtins_sources}
+    effects/trackmouse/trackmouse.cpp
+)
 
-kde4_add_kcfg_files(kwin4_effect_builtins_sources trackmouse/trackmouseconfig.kcfgc)
+kde4_add_kcfg_files(kwin4_effect_builtins_sources effects/trackmouse/trackmouseconfig.kcfgc)
 
 # .desktop files
-install( FILES
-    trackmouse/trackmouse.desktop
-    DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/trackmouse/trackmouse.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
 
 # Data files
-install( FILES
-    trackmouse/data/tm_inner.png
-    trackmouse/data/tm_outer.png
-    DESTINATION ${DATA_INSTALL_DIR}/kwin )
+install(FILES
+    effects/trackmouse/data/tm_inner.png
+    effects/trackmouse/data/tm_outer.png
+    DESTINATION ${DATA_INSTALL_DIR}/kwin
+)
 
 #######################################
 # Config
 
 # Source files
-set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources}
-    trackmouse/trackmouse_config.cpp
-    trackmouse/trackmouse_config.ui
-    )
+set(kwin4_effect_builtins_config_sources
+    ${kwin4_effect_builtins_config_sources}
+    effects/trackmouse/trackmouse_config.cpp
+)
 
-kde4_add_kcfg_files(kwin4_effect_builtins_config_sources trackmouse/trackmouseconfig.kcfgc)
+kde4_add_kcfg_files(kwin4_effect_builtins_config_sources effects/trackmouse/trackmouseconfig.kcfgc)
 
 # .desktop files
-install( FILES
-    trackmouse/trackmouse_config.desktop
-    DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/trackmouse/trackmouse_config.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
index 7c3808f..82298a4 100644 (file)
@@ -159,4 +159,3 @@ X-KDE-PluginInfo-Category=Accessibility
 X-KDE-PluginInfo-Depends=
 X-KDE-PluginInfo-License=GPL
 X-KDE-PluginInfo-EnabledByDefault=false
-X-KDE-Library=kwin4_effect_builtins
index 1f25a99..57a5a42 100644 (file)
@@ -2,29 +2,26 @@
 # Effect
 
 # Source files
-set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
-    windowgeometry/windowgeometry.cpp
-    )
+set(kwin4_effect_builtins_sources
+    ${kwin4_effect_builtins_sources}
+    effects/windowgeometry/windowgeometry.cpp
+)
 
-kde4_add_kcfg_files(kwin4_effect_builtins_sources windowgeometry/windowgeometryconfig.kcfgc)
+kde4_add_kcfg_files(kwin4_effect_builtins_sources effects/windowgeometry/windowgeometryconfig.kcfgc)
 
 # .desktop files
-install( FILES
-    windowgeometry/windowgeometry.desktop
-    DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/windowgeometry/windowgeometry.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
 
 #######################################
 # Config
 
 # Source files
-set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources}
-    windowgeometry/windowgeometry_config.cpp
-    windowgeometry/windowgeometry_config.ui
-    )
+set(kwin4_effect_builtins_config_sources
+    ${kwin4_effect_builtins_config_sources}
+    effects/windowgeometry/windowgeometry_config.cpp
+)
 
-kde4_add_kcfg_files(kwin4_effect_builtins_config_sources windowgeometry/windowgeometryconfig.kcfgc)
+kde4_add_kcfg_files(kwin4_effect_builtins_config_sources effects/windowgeometry/windowgeometryconfig.kcfgc)
 
 # .desktop files
-install( FILES
-    windowgeometry/windowgeometry_config.desktop
-    DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/windowgeometry/windowgeometry_config.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
index 922edf3..ca649c8 100644 (file)
@@ -33,9 +33,9 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 using namespace KWin;
 
-KWIN_EFFECT(windowgeometry, WindowGeometry)
+KWIN_EFFECT(windowgeometry, WindowGeometryEffect)
 
-WindowGeometry::WindowGeometry()
+WindowGeometryEffect::WindowGeometryEffect()
 {
     iAmActivated = true;
     iAmActive = false;
@@ -69,20 +69,20 @@ WindowGeometry::WindowGeometry()
     connect(effects, SIGNAL(windowStepUserMovedResized(KWin::EffectWindow*,QRect)), this, SLOT(slotWindowStepUserMovedResized(KWin::EffectWindow*,QRect)));
 }
 
-WindowGeometry::~WindowGeometry()
+WindowGeometryEffect::~WindowGeometryEffect()
 {
     for (int i = 0; i < 3; ++i)
         delete myMeasure[i];
 }
 
-void WindowGeometry::reconfigure(ReconfigureFlags)
+void WindowGeometryEffect::reconfigure(ReconfigureFlags)
 {
     WindowGeometryConfiguration::self()->readConfig();
     iHandleMoves = WindowGeometryConfiguration::move();
     iHandleResizes = WindowGeometryConfiguration::resize();
 }
 
-void WindowGeometry::paintScreen(int mask, QRegion region, ScreenPaintData &data)
+void WindowGeometryEffect::paintScreen(int mask, QRegion region, ScreenPaintData &data)
 {
     effects->paintScreen(mask, region, data);
     if (iAmActivated && iAmActive) {
@@ -91,12 +91,12 @@ void WindowGeometry::paintScreen(int mask, QRegion region, ScreenPaintData &data
     }
 }
 
-void WindowGeometry::toggle()
+void WindowGeometryEffect::toggle()
 {
     iAmActivated = !iAmActivated;
 }
 
-void WindowGeometry::slotWindowStartUserMovedResized(EffectWindow *w)
+void WindowGeometryEffect::slotWindowStartUserMovedResized(EffectWindow *w)
 {
     if (!iAmActivated)
         return;
@@ -112,7 +112,7 @@ void WindowGeometry::slotWindowStartUserMovedResized(EffectWindow *w)
     slotWindowStepUserMovedResized(w, w->geometry());
 }
 
-void WindowGeometry::slotWindowFinishUserMovedResized(EffectWindow *w)
+void WindowGeometryEffect::slotWindowFinishUserMovedResized(EffectWindow *w)
 {
     if (iAmActive && w == myResizeWindow) {
         iAmActive = false;
@@ -140,7 +140,7 @@ static inline QString number(int n)
 }
 
 
-void WindowGeometry::slotWindowStepUserMovedResized(EffectWindow *w, const QRect &geometry)
+void WindowGeometryEffect::slotWindowStepUserMovedResized(EffectWindow *w, const QRect &geometry)
 {
     if (iAmActivated && iAmActive && w == myResizeWindow) {
         if (myExtraDirtyArea.isValid())
@@ -218,7 +218,7 @@ void WindowGeometry::slotWindowStepUserMovedResized(EffectWindow *w, const QRect
     }
 }
 
-bool WindowGeometry::isActive() const
+bool WindowGeometryEffect::isActive() const
 {
     return iAmActive;
 }
index f5e7e24..b1c0e68 100644 (file)
@@ -126,6 +126,5 @@ X-KDE-PluginInfo-Depends=
 # Whether this effect should be enabled by default
 X-KDE-PluginInfo-EnabledByDefault=false
 # The plugin (library) which contains the effect. One library may contain more effects.
-X-KDE-Library=kwin4_effect_builtins
 # The order in which this effect is loaded.  Lower numbers are loaded first.
 X-KDE-Ordering=90
index 3211fdd..3323cb1 100644 (file)
@@ -26,14 +26,14 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 namespace KWin
 {
 
-class WindowGeometry : public Effect
+class WindowGeometryEffect : public Effect
 {
     Q_OBJECT
     Q_PROPERTY(bool handlesMoves READ isHandlesMoves)
     Q_PROPERTY(bool handlesResizes READ isHandlesResizes)
 public:
-    WindowGeometry();
-    ~WindowGeometry();
+    WindowGeometryEffect();
+    ~WindowGeometryEffect();
 
     inline bool provides(Effect::Feature ef) {
         return ef == Effect::GeometryTip;
index ca2449e..b68d05f 100644 (file)
@@ -2,28 +2,25 @@
 # Effect
 
 # Source files
-set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
-    zoom/zoom.cpp
-    )
+set(kwin4_effect_builtins_sources
+    ${kwin4_effect_builtins_sources}
+    effects/zoom/zoom.cpp
+)
 
-kde4_add_kcfg_files(kwin4_effect_builtins_sources zoom/zoomconfig.kcfgc)
+kde4_add_kcfg_files(kwin4_effect_builtins_sources effects/zoom/zoomconfig.kcfgc)
 
 # .desktop files
-install( FILES
-    zoom/zoom.desktop
-    DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/zoom/zoom.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
 
 #######################################
 # Config
 
 # Source files
-set( kwin4_effect_builtins_config_sources ${kwin4_effect_builtins_config_sources}
-    zoom/zoom_config.cpp
-    zoom/zoom_config.ui
-    )
-kde4_add_kcfg_files(kwin4_effect_builtins_config_sources zoom/zoomconfig.kcfgc)
+set(kwin4_effect_builtins_config_sources
+    ${kwin4_effect_builtins_config_sources}
+    effects/zoom/zoom_config.cpp
+)
+kde4_add_kcfg_files(kwin4_effect_builtins_config_sources effects/zoom/zoomconfig.kcfgc)
 
 # .desktop files
-install( FILES
-    zoom/zoom_config.desktop
-    DESTINATION ${SERVICES_INSTALL_DIR}/kwin )
+install(FILES effects/zoom/zoom_config.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kwin)
index b00ec27..3c63afb 100644 (file)
@@ -166,4 +166,3 @@ X-KDE-PluginInfo-Category=Accessibility
 X-KDE-PluginInfo-Depends=
 X-KDE-PluginInfo-License=GPL
 X-KDE-PluginInfo-EnabledByDefault=true
-X-KDE-Library=kwin4_effect_builtins
index e66b25a..3194d69 100644 (file)
@@ -1187,7 +1187,7 @@ Q_SIGNALS:
 protected:
     QVector< EffectPair > loaded_effects;
     QHash< QString, QLibrary* > effect_libraries;
-    //QHash< QString, EffectFactory* > effect_factories;
+    QHash< QString, Effect* > effect_factories;
     CompositingType compositing_type;
 };