diff --git a/CMakeLists.txt b/CMakeLists.txt index ad92a79da6..22bfc05ac3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -240,6 +240,7 @@ qt5_add_resources( kwin_KDEINIT_SRCS resources.qrc ) set(kwin_OWN_LIBS kdecorations kwineffects + kwin4_effect_builtins ) set(kwin_QT_LIBS diff --git a/effects.cpp b/effects.cpp index 8526bf3bd0..7da54f4992 100644 --- a/effects.cpp +++ b/effects.cpp @@ -47,6 +47,7 @@ along with this program. If not, see . #include "virtualdesktops.h" #include "workspace.h" #include "kwinglutils.h" +#include "effects/effect_builtins.h" #include #include @@ -1391,6 +1392,12 @@ bool EffectsHandlerImpl::loadEffect(const QString& name, bool checkDefault) return loadScriptedEffect(name, service.data()); } + if (Effect *e = loadBuiltInEffect(internalname.remove(QStringLiteral("kwin4_effect_")).toUtf8(), checkDefault)) { + effect_order.insert(service->property(QStringLiteral("X-KDE-Ordering")).toInt(), EffectPair(name, e)); + effectsChanged(); + return true; + } + KLibrary* library = findEffectLibrary(service.data()); if (!library) { return false; @@ -1474,6 +1481,23 @@ bool EffectsHandlerImpl::loadEffect(const QString& name, bool checkDefault) return true; } +Effect *EffectsHandlerImpl::loadBuiltInEffect(const QByteArray &name, bool checkDefault) +{ + if (!BuiltInEffects::available(name)) { + return nullptr; + } + if (!BuiltInEffects::supported(name)) { + qWarning() << "Effect " << name << " is not supported" ; + return nullptr; + } + if (checkDefault) { + if (!BuiltInEffects::enabledByDefault(name)) { + return nullptr; + } + } + return BuiltInEffects::create(name); +} + bool EffectsHandlerImpl::loadScriptedEffect(const QString& name, KService *service) { #ifdef KWIN_BUILD_SCRIPTING diff --git a/effects.h b/effects.h index 7ccde39fb5..adcf970a43 100644 --- a/effects.h +++ b/effects.h @@ -265,6 +265,7 @@ private Q_SLOTS: private: typedef QVector< Effect*> EffectsList; typedef EffectsList::const_iterator EffectsIterator; + Effect *loadBuiltInEffect(const QByteArray &name, bool checkDefault); EffectsList m_activeEffects; EffectsIterator m_currentDrawWindowIterator; EffectsIterator m_currentPaintWindowIterator; diff --git a/effects/CMakeLists.txt b/effects/CMakeLists.txt index 6e7d5500f1..de85ad6e5d 100644 --- a/effects/CMakeLists.txt +++ b/effects/CMakeLists.txt @@ -42,7 +42,7 @@ elseif(KWIN_BUILD_OPENGLES) endif() macro( KWIN4_ADD_EFFECT_BACKEND name ) - add_library( ${name} MODULE ${ARGN} ) + add_library( ${name} SHARED ${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() @@ -56,8 +56,10 @@ macro( KWIN4_ADD_EFFECT name ) elseif(KWIN_BUILD_OPENGLES) set_target_properties(kwin4_effect_${name} PROPERTIES COMPILE_FLAGS "-DKWIN_HAVE_OPENGLES") endif() + + set_target_properties(kwin4_effect_${name} PROPERTIES VERSION 1.0.0 SOVERSION 1 ) set_target_properties(kwin4_effect_${name} PROPERTIES OUTPUT_NAME ${KWIN_NAME}4_effect_${name}) - install( TARGETS kwin4_effect_${name} DESTINATION ${PLUGIN_INSTALL_DIR} ) + install(TARGETS kwin4_effect_${name} ${INSTALL_TARGETS_DEFAULT_ARGS} ) endmacro() @@ -97,7 +99,7 @@ endmacro() install( FILES kwineffect.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR} ) # Create initial variables -set( kwin4_effect_builtins_sources logging.cpp) +set( kwin4_effect_builtins_sources logging.cpp effect_builtins.cpp) if( NOT KWIN_MOBILE_EFFECTS ) set( kwin4_effect_builtins_config_sources configs_builtins.cpp ) endif() diff --git a/effects/backgroundcontrast/contrast.cpp b/effects/backgroundcontrast/contrast.cpp index 389a442609..ea1d223d82 100644 --- a/effects/backgroundcontrast/contrast.cpp +++ b/effects/backgroundcontrast/contrast.cpp @@ -32,10 +32,6 @@ namespace KWin { -KWIN_EFFECT(contrast, ContrastEffect) -KWIN_EFFECT_SUPPORTED(contrast, ContrastEffect::supported()) -KWIN_EFFECT_ENABLEDBYDEFAULT(contrast, ContrastEffect::enabledByDefault()) - ContrastEffect::ContrastEffect() { shader = ContrastShader::create(); diff --git a/effects/blur/blur.cpp b/effects/blur/blur.cpp index 9b40281b45..7983002eb4 100644 --- a/effects/blur/blur.cpp +++ b/effects/blur/blur.cpp @@ -29,10 +29,6 @@ namespace KWin { -KWIN_EFFECT(blur, BlurEffect) -KWIN_EFFECT_SUPPORTED(blur, BlurEffect::supported()) -KWIN_EFFECT_ENABLEDBYDEFAULT(blur, BlurEffect::enabledByDefault()) - BlurEffect::BlurEffect() { shader = BlurShader::create(); diff --git a/effects/coverswitch/coverswitch.cpp b/effects/coverswitch/coverswitch.cpp index 0e2d581b7b..a174069d78 100644 --- a/effects/coverswitch/coverswitch.cpp +++ b/effects/coverswitch/coverswitch.cpp @@ -37,9 +37,6 @@ along with this program. If not, see . namespace KWin { -KWIN_EFFECT(coverswitch, CoverSwitchEffect) -KWIN_EFFECT_SUPPORTED(coverswitch, CoverSwitchEffect::supported()) - CoverSwitchEffect::CoverSwitchEffect() : mActivated(0) , angle(60.0) diff --git a/effects/cube/cube.cpp b/effects/cube/cube.cpp index 8b010701a4..7b80dde5a3 100644 --- a/effects/cube/cube.cpp +++ b/effects/cube/cube.cpp @@ -47,9 +47,6 @@ along with this program. If not, see . namespace KWin { -KWIN_EFFECT(cube, CubeEffect) -KWIN_EFFECT_SUPPORTED(cube, CubeEffect::supported()) - CubeEffect::CubeEffect() : activated(false) , cube_painting(false) diff --git a/effects/dashboard/dashboard.cpp b/effects/dashboard/dashboard.cpp index 6e11d6d30a..4781f6ac00 100644 --- a/effects/dashboard/dashboard.cpp +++ b/effects/dashboard/dashboard.cpp @@ -26,7 +26,6 @@ along with this program. If not, see . namespace KWin { -KWIN_EFFECT(dashboard, DashboardEffect) DashboardEffect::DashboardEffect() : transformWindow(false) diff --git a/effects/desktopgrid/desktopgrid.cpp b/effects/desktopgrid/desktopgrid.cpp index 6455c3866b..402bc9d960 100644 --- a/effects/desktopgrid/desktopgrid.cpp +++ b/effects/desktopgrid/desktopgrid.cpp @@ -45,8 +45,6 @@ namespace KWin // WARNING, TODO: This effect relies on the desktop layout being EWMH-compliant. -KWIN_EFFECT(desktopgrid, DesktopGridEffect) - DesktopGridEffect::DesktopGridEffect() : activated(false) , timeline() diff --git a/effects/diminactive/diminactive.cpp b/effects/diminactive/diminactive.cpp index 6a4a287860..23b56284fd 100644 --- a/effects/diminactive/diminactive.cpp +++ b/effects/diminactive/diminactive.cpp @@ -28,8 +28,6 @@ along with this program. If not, see . namespace KWin { -KWIN_EFFECT(diminactive, DimInactiveEffect) - DimInactiveEffect::DimInactiveEffect() { reconfigure(ReconfigureAll); diff --git a/effects/dimscreen/dimscreen.cpp b/effects/dimscreen/dimscreen.cpp index 81554498bc..3b6147c1bb 100644 --- a/effects/dimscreen/dimscreen.cpp +++ b/effects/dimscreen/dimscreen.cpp @@ -24,8 +24,6 @@ along with this program. If not, see . namespace KWin { -KWIN_EFFECT(dimscreen, DimScreenEffect) - DimScreenEffect::DimScreenEffect() : mActivated(false) , activateAnimation(false) diff --git a/effects/effect_builtins.cpp b/effects/effect_builtins.cpp new file mode 100644 index 0000000000..eb82204586 --- /dev/null +++ b/effects/effect_builtins.cpp @@ -0,0 +1,223 @@ +/******************************************************************** + KWin - the KDE window manager + This file is part of the KDE project. + +Copyright (C) 2014 Martin Gräßlin + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*********************************************************************/ +#include "effect_builtins.h" +// common effects +#include "backgroundcontrast/contrast.h" +#include "blur/blur.h" +#include "kscreen/kscreen.h" +#include "presentwindows/presentwindows.h" +#include "screenedge/screenedgeeffect.h" +#include "screenshot/screenshot.h" +#include "slidingpopups/slidingpopups.h" +#include "taskbarthumbnail/taskbarthumbnail.h" +// Common effects only relevant to desktop +#include "dashboard/dashboard.h" +#include "desktopgrid/desktopgrid.h" +#include "diminactive/diminactive.h" +#include "dimscreen/dimscreen.h" +#include "fallapart/fallapart.h" +#include "highlightwindow/highlightwindow.h" +#include "magiclamp/magiclamp.h" +#include "minimizeanimation/minimizeanimation.h" +#include "resize/resize.h" +#include "showfps/showfps.h" +#include "showpaint/showpaint.h" +#include "slide/slide.h" +#include "slideback/slideback.h" +#include "thumbnailaside/thumbnailaside.h" +#include "windowgeometry/windowgeometry.h" +#include "zoom/zoom.h" +#include "logout/logout.h" +// OpenGL-specific effects for desktop +#include "coverswitch/coverswitch.h" +#include "cube/cube.h" +#include "flipswitch/flipswitch.h" +#include "glide/glide.h" +#include "invert/invert.h" +#include "lookingglass/lookingglass.h" +#include "magnifier/magnifier.h" +#include "mouseclick/mouseclick.h" +#include "mousemark/mousemark.h" +#include "sheet/sheet.h" +#include "snaphelper/snaphelper.h" +#include "startupfeedback/startupfeedback.h" +#include "trackmouse/trackmouse.h" +#include "wobblywindows/wobblywindows.h" + +namespace KWin +{ + +template +inline Effect *createHelper() +{ + return new T(); +} + +class EffectLoader +{ +public: + EffectLoader(); + Effect *create(const QByteArray &name); + bool hasEffect(const QByteArray &name) const; + bool supported(const QByteArray &name) const; + bool enabledByDefault(const QByteArray &name) const; + +private: + typedef Effect *(*CreateInstanceFunction)(); + typedef bool (*SupportedFunction)(); + QHash m_createHash; + QHash m_supportedHash; + QHash m_enabledHash; +}; + +EffectLoader::EffectLoader() +{ +#define EFFECT(name, className) \ + m_createHash.insert(QByteArrayLiteral(#name), &createHelper< className >); + EFFECT(blur, BlurEffect) + EFFECT(contrast, ContrastEffect) + EFFECT(coverswitch, CoverSwitchEffect) + EFFECT(cube, CubeEffect) + EFFECT(dashboard, DashboardEffect) + EFFECT(desktopgrid, DesktopGridEffect) + EFFECT(diminactive, DimInactiveEffect) + EFFECT(dimscreen, DimScreenEffect) + EFFECT(fallapart, FallApartEffect) + EFFECT(flipswitch, FlipSwitchEffect) + EFFECT(glide, GlideEffect) + EFFECT(highlightwindow, HighlightWindowEffect) + EFFECT(invert, InvertEffect) + EFFECT(kscreen, KscreenEffect) + EFFECT(logout, LogoutEffect) + EFFECT(lookingglass, LookingGlassEffect) + EFFECT(magiclamp, MagicLampEffect) + EFFECT(magnifier, MagnifierEffect) + EFFECT(minimizeanimation, MinimizeAnimationEffect) + EFFECT(mouseclick, MouseClickEffect) + EFFECT(mousemark, MouseMarkEffect) + EFFECT(presentwindows, PresentWindowsEffect) + EFFECT(resize, ResizeEffect) + EFFECT(screenedge, ScreenEdgeEffect) + EFFECT(screenshot, ScreenShotEffect) + EFFECT(sheet, SheetEffect) + EFFECT(showfps, ShowFpsEffect) + EFFECT(showpaint, ShowPaintEffect) + EFFECT(slide, SlideEffect) + EFFECT(slideback, SlideBackEffect) + EFFECT(slidingpopups, SlidingPopupsEffect) + EFFECT(snaphelper, SnapHelperEffect) + EFFECT(startupfeedback, StartupFeedbackEffect) + EFFECT(taskbarthumbnail, TaskbarThumbnailEffect) + EFFECT(thumbnailaside, ThumbnailAsideEffect) + EFFECT(trackmouse, TrackMouseEffect) + EFFECT(windowgeometry, WindowGeometry) + EFFECT(wobblywindows, WobblyWindowsEffect) + EFFECT(zoom, ZoomEffect) + +#undef EFFECT + +#define SUPPORTED(name, method) \ + m_supportedHash.insert(QByteArrayLiteral(#name), &method); + SUPPORTED(blur, BlurEffect::supported) + SUPPORTED(contrast, ContrastEffect::supported) + SUPPORTED(coverswitch, CoverSwitchEffect::supported) + SUPPORTED(cube, CubeEffect::supported) + SUPPORTED(fallapart, FallApartEffect::supported) + SUPPORTED(flipswitch, FlipSwitchEffect::supported) + SUPPORTED(glide, GlideEffect::supported) + SUPPORTED(invert, InvertEffect::supported) + SUPPORTED(lookingglass, LookingGlassEffect::supported) + SUPPORTED(magiclamp, MagicLampEffect::supported) + SUPPORTED(magnifier, MagnifierEffect::supported) + SUPPORTED(screenshot, ScreenShotEffect::supported) + SUPPORTED(sheet, SheetEffect::supported) + SUPPORTED(startupfeedback, StartupFeedbackEffect::supported) + SUPPORTED(wobblywindows, WobblyWindowsEffect::supported) + +#undef SUPPORTED + +#define ENABLED(name, method) \ + m_enabledHash.insert(QByteArrayLiteral(#name), &method); + ENABLED(blur, BlurEffect::enabledByDefault) + ENABLED(contrast, ContrastEffect::enabledByDefault) + +#undef ENABLED +} + +Effect *EffectLoader::create(const QByteArray &name) +{ + auto it = m_createHash.constFind(name); + if (it == m_createHash.constEnd()) { + return nullptr; + } + return it.value()(); +} + +bool EffectLoader::hasEffect(const QByteArray &name) const +{ + return m_createHash.contains(name); +} + +bool EffectLoader::supported(const QByteArray &name) const +{ + auto it = m_supportedHash.constFind(name); + if (it != m_supportedHash.constEnd()) { + return it.value()(); + } + return true; +} + +bool EffectLoader::enabledByDefault(const QByteArray &name) const +{ + auto it = m_enabledHash.constFind(name); + if (it != m_enabledHash.constEnd()) { + return it.value()(); + } + return true; +} + +Q_GLOBAL_STATIC(EffectLoader, s_effectLoader) + +namespace BuiltInEffects +{ + +Effect *create(const QByteArray &name) +{ + return s_effectLoader->create(name); +} + +bool available(const QByteArray &name) +{ + return s_effectLoader->hasEffect(name); +} + +bool supported(const QByteArray &name) +{ + return s_effectLoader->supported(name); +} + +bool enabledByDefault(const QByteArray &name) +{ + return s_effectLoader->enabledByDefault(name); +} + +} // BuiltInEffects + +} // namespace diff --git a/effects/effect_builtins.h b/effects/effect_builtins.h new file mode 100644 index 0000000000..3a0dc476fc --- /dev/null +++ b/effects/effect_builtins.h @@ -0,0 +1,41 @@ +/******************************************************************** + KWin - the KDE window manager + This file is part of the KDE project. + +Copyright (C) 2014 Martin Gräßlin + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*********************************************************************/ +#ifndef KWIN_EFFECT_BUILTINS_H +#define KWIN_EFFECT_BUILTINS_H +#include + +class QByteArray; + +namespace KWin +{ +class Effect; + +namespace BuiltInEffects +{ + +KWINEFFECTS_EXPORT Effect *create(const QByteArray &name); +KWINEFFECTS_EXPORT bool available(const QByteArray &name); +KWINEFFECTS_EXPORT bool supported(const QByteArray &name); +KWINEFFECTS_EXPORT bool enabledByDefault(const QByteArray &name); +} + +} + +#endif diff --git a/effects/fallapart/fallapart.cpp b/effects/fallapart/fallapart.cpp index ace7868c54..5a8d60c78f 100644 --- a/effects/fallapart/fallapart.cpp +++ b/effects/fallapart/fallapart.cpp @@ -26,9 +26,6 @@ along with this program. If not, see . namespace KWin { -KWIN_EFFECT(fallapart, FallApartEffect) -KWIN_EFFECT_SUPPORTED(fallapart, FallApartEffect::supported()) - bool FallApartEffect::supported() { return effects->isOpenGLCompositing(); diff --git a/effects/flipswitch/flipswitch.cpp b/effects/flipswitch/flipswitch.cpp index 008fd55599..db652c4ef2 100644 --- a/effects/flipswitch/flipswitch.cpp +++ b/effects/flipswitch/flipswitch.cpp @@ -38,9 +38,6 @@ along with this program. If not, see . namespace KWin { -KWIN_EFFECT(flipswitch, FlipSwitchEffect) -KWIN_EFFECT_SUPPORTED(flipswitch, FlipSwitchEffect::supported()) - FlipSwitchEffect::FlipSwitchEffect() : m_currentAnimationShape(QTimeLine::EaseInOutCurve) , m_active(false) diff --git a/effects/glide/glide.cpp b/effects/glide/glide.cpp index b133858159..b8ef783481 100644 --- a/effects/glide/glide.cpp +++ b/effects/glide/glide.cpp @@ -34,9 +34,6 @@ along with this program. If not, see . namespace KWin { -KWIN_EFFECT(glide, GlideEffect) -KWIN_EFFECT_SUPPORTED(glide, GlideEffect::supported()) - static const int IsGlideWindow = 0x22A982D4; static Atom slideAtom; diff --git a/effects/highlightwindow/highlightwindow.cpp b/effects/highlightwindow/highlightwindow.cpp index 647b47bcfd..4e7823b5b5 100644 --- a/effects/highlightwindow/highlightwindow.cpp +++ b/effects/highlightwindow/highlightwindow.cpp @@ -23,8 +23,6 @@ along with this program. If not, see . namespace KWin { -KWIN_EFFECT(highlightwindow, HighlightWindowEffect) - HighlightWindowEffect::HighlightWindowEffect() : m_finishing(false) , m_fadeDuration(float(animationTime(150))) diff --git a/effects/invert/invert.cpp b/effects/invert/invert.cpp index 03ce15d8af..a121129dde 100644 --- a/effects/invert/invert.cpp +++ b/effects/invert/invert.cpp @@ -33,9 +33,6 @@ along with this program. If not, see . namespace KWin { -KWIN_EFFECT(invert, InvertEffect) -KWIN_EFFECT_SUPPORTED(invert, InvertEffect::supported()) - InvertEffect::InvertEffect() : m_inited(false), m_valid(true), diff --git a/effects/kscreen/kscreen.cpp b/effects/kscreen/kscreen.cpp index 574742535a..cdab01aa2b 100644 --- a/effects/kscreen/kscreen.cpp +++ b/effects/kscreen/kscreen.cpp @@ -50,8 +50,6 @@ along with this program. If not, see . namespace KWin { -KWIN_EFFECT(kscreen, KscreenEffect) - KscreenEffect::KscreenEffect() : Effect() , m_state(StateNormal) diff --git a/effects/logout/logout.cpp b/effects/logout/logout.cpp index 5e19469697..ff2602e3fb 100644 --- a/effects/logout/logout.cpp +++ b/effects/logout/logout.cpp @@ -35,8 +35,6 @@ along with this program. If not, see . namespace KWin { -KWIN_EFFECT(logout, LogoutEffect) - LogoutEffect::LogoutEffect() : progress(0.0) , displayEffect(false) diff --git a/effects/lookingglass/lookingglass.cpp b/effects/lookingglass/lookingglass.cpp index 31edd1dbf0..f7387547ee 100644 --- a/effects/lookingglass/lookingglass.cpp +++ b/effects/lookingglass/lookingglass.cpp @@ -38,10 +38,6 @@ along with this program. If not, see . namespace KWin { -KWIN_EFFECT(lookingglass, LookingGlassEffect) -KWIN_EFFECT_SUPPORTED(lookingglass, LookingGlassEffect::supported()) - - LookingGlassEffect::LookingGlassEffect() : zoom(1.0f) , target_zoom(1.0f) diff --git a/effects/magiclamp/magiclamp.cpp b/effects/magiclamp/magiclamp.cpp index 85951683d6..ff15da2541 100644 --- a/effects/magiclamp/magiclamp.cpp +++ b/effects/magiclamp/magiclamp.cpp @@ -32,9 +32,6 @@ along with this program. If not, see . namespace KWin { -KWIN_EFFECT(magiclamp, MagicLampEffect) -KWIN_EFFECT_SUPPORTED(magiclamp, MagicLampEffect::supported()) - MagicLampEffect::MagicLampEffect() { mActiveAnimations = 0; diff --git a/effects/magnifier/magnifier.cpp b/effects/magnifier/magnifier.cpp index 1159134487..f7f815c8b8 100644 --- a/effects/magnifier/magnifier.cpp +++ b/effects/magnifier/magnifier.cpp @@ -38,9 +38,6 @@ along with this program. If not, see . namespace KWin { -KWIN_EFFECT(magnifier, MagnifierEffect) -KWIN_EFFECT_SUPPORTED(magnifier, MagnifierEffect::supported()) - const int FRAME_WIDTH = 5; MagnifierEffect::MagnifierEffect() diff --git a/effects/minimizeanimation/minimizeanimation.cpp b/effects/minimizeanimation/minimizeanimation.cpp index 6d4f38827b..4546cf88cc 100644 --- a/effects/minimizeanimation/minimizeanimation.cpp +++ b/effects/minimizeanimation/minimizeanimation.cpp @@ -25,8 +25,6 @@ along with this program. If not, see . namespace KWin { -KWIN_EFFECT(minimizeanimation, MinimizeAnimationEffect) - MinimizeAnimationEffect::MinimizeAnimationEffect() { mActiveAnimations = 0; diff --git a/effects/mouseclick/mouseclick.cpp b/effects/mouseclick/mouseclick.cpp index 22b28e7db8..8957d26737 100644 --- a/effects/mouseclick/mouseclick.cpp +++ b/effects/mouseclick/mouseclick.cpp @@ -41,8 +41,6 @@ along with this program. If not, see . namespace KWin { -KWIN_EFFECT(mouseclick, MouseClickEffect) - MouseClickEffect::MouseClickEffect() { m_enabled = false; diff --git a/effects/mousemark/mousemark.cpp b/effects/mousemark/mousemark.cpp index 88cee2f5c0..c9b1be5cfd 100644 --- a/effects/mousemark/mousemark.cpp +++ b/effects/mousemark/mousemark.cpp @@ -43,8 +43,6 @@ namespace KWin #define NULL_POINT (QPoint( -1, -1 )) // null point is (0,0), which is valid :-/ -KWIN_EFFECT(mousemark, MouseMarkEffect) - MouseMarkEffect::MouseMarkEffect() { QAction* a = new QAction(this); diff --git a/effects/presentwindows/presentwindows.cpp b/effects/presentwindows/presentwindows.cpp index a0120b57da..b8ddf06539 100755 --- a/effects/presentwindows/presentwindows.cpp +++ b/effects/presentwindows/presentwindows.cpp @@ -48,8 +48,6 @@ along with this program. If not, see . namespace KWin { -KWIN_EFFECT(presentwindows, PresentWindowsEffect) - PresentWindowsEffect::PresentWindowsEffect() : m_proxy(this) , m_activated(false) diff --git a/effects/resize/resize.cpp b/effects/resize/resize.cpp index 86b106f653..b7d67c4ee8 100644 --- a/effects/resize/resize.cpp +++ b/effects/resize/resize.cpp @@ -35,8 +35,6 @@ along with this program. If not, see . namespace KWin { -KWIN_EFFECT(resize, ResizeEffect) - ResizeEffect::ResizeEffect() : AnimationEffect() , m_active(false) diff --git a/effects/screenedge/screenedgeeffect.cpp b/effects/screenedge/screenedgeeffect.cpp index 7661edeb1e..f38c92bd0d 100644 --- a/effects/screenedge/screenedgeeffect.cpp +++ b/effects/screenedge/screenedgeeffect.cpp @@ -35,8 +35,6 @@ along with this program. If not, see . namespace KWin { -KWIN_EFFECT(screenedge, ScreenEdgeEffect) - ScreenEdgeEffect::ScreenEdgeEffect() : Effect() , m_glow(new Plasma::Svg(this)) diff --git a/effects/screenshot/screenshot.cpp b/effects/screenshot/screenshot.cpp index be3c9f0abf..5b30fd5e0f 100644 --- a/effects/screenshot/screenshot.cpp +++ b/effects/screenshot/screenshot.cpp @@ -32,9 +32,6 @@ along with this program. If not, see . namespace KWin { -KWIN_EFFECT(screenshot, ScreenShotEffect) -KWIN_EFFECT_SUPPORTED(screenshot, ScreenShotEffect::supported()) - bool ScreenShotEffect::supported() { return effects->compositingType() == XRenderCompositing || diff --git a/effects/sheet/sheet.cpp b/effects/sheet/sheet.cpp index ee5eddf279..a59acc726a 100644 --- a/effects/sheet/sheet.cpp +++ b/effects/sheet/sheet.cpp @@ -31,9 +31,6 @@ along with this program. If not, see . namespace KWin { -KWIN_EFFECT(sheet, SheetEffect) -KWIN_EFFECT_SUPPORTED(sheet, SheetEffect::supported()) - static const int IsSheetWindow = 0x22A982D5; SheetEffect::SheetEffect() diff --git a/effects/showfps/showfps.cpp b/effects/showfps/showfps.cpp index 13241656ff..cea7d540f4 100644 --- a/effects/showfps/showfps.cpp +++ b/effects/showfps/showfps.cpp @@ -39,8 +39,6 @@ along with this program. If not, see . namespace KWin { -KWIN_EFFECT(showfps, ShowFpsEffect) - const int FPS_WIDTH = 10; const int MAX_TIME = 100; diff --git a/effects/showpaint/showpaint.cpp b/effects/showpaint/showpaint.cpp index 5a7a044a21..4964d9e3c1 100644 --- a/effects/showpaint/showpaint.cpp +++ b/effects/showpaint/showpaint.cpp @@ -36,8 +36,6 @@ along with this program. If not, see . namespace KWin { -KWIN_EFFECT(showpaint, ShowPaintEffect) - static QColor colors[] = { Qt::red, Qt::green, Qt::blue, Qt::cyan, Qt::magenta, Qt::yellow, Qt::gray }; diff --git a/effects/slide/slide.cpp b/effects/slide/slide.cpp index 7ed5408c5c..8ecb2a6250 100644 --- a/effects/slide/slide.cpp +++ b/effects/slide/slide.cpp @@ -26,8 +26,6 @@ along with this program. If not, see . namespace KWin { -KWIN_EFFECT(slide, SlideEffect) - SlideEffect::SlideEffect() : slide(false) { diff --git a/effects/slideback/slideback.cpp b/effects/slideback/slideback.cpp index f280e034b7..003ae29c7f 100644 --- a/effects/slideback/slideback.cpp +++ b/effects/slideback/slideback.cpp @@ -23,8 +23,6 @@ along with this program. If not, see . namespace KWin { -KWIN_EFFECT(slideback, SlideBackEffect) - SlideBackEffect::SlideBackEffect() { m_tabboxActive = 0; diff --git a/effects/slidingpopups/slidingpopups.cpp b/effects/slidingpopups/slidingpopups.cpp index 823023e9d0..479a93a861 100644 --- a/effects/slidingpopups/slidingpopups.cpp +++ b/effects/slidingpopups/slidingpopups.cpp @@ -26,8 +26,6 @@ along with this program. If not, see . namespace KWin { -KWIN_EFFECT(slidingpopups, SlidingPopupsEffect) - SlidingPopupsEffect::SlidingPopupsEffect() { mAtom = effects->announceSupportProperty("_KDE_SLIDE", this); diff --git a/effects/snaphelper/snaphelper.cpp b/effects/snaphelper/snaphelper.cpp index a8cd1a96e8..ec3e8dea92 100644 --- a/effects/snaphelper/snaphelper.cpp +++ b/effects/snaphelper/snaphelper.cpp @@ -30,8 +30,6 @@ along with this program. If not, see . namespace KWin { -KWIN_EFFECT(snaphelper, SnapHelperEffect) - SnapHelperEffect::SnapHelperEffect() : m_active(false) , m_window(NULL) diff --git a/effects/startupfeedback/startupfeedback.cpp b/effects/startupfeedback/startupfeedback.cpp index 4026e6ee7a..ea3a468e5e 100644 --- a/effects/startupfeedback/startupfeedback.cpp +++ b/effects/startupfeedback/startupfeedback.cpp @@ -38,9 +38,6 @@ along with this program. If not, see . namespace KWin { -KWIN_EFFECT(startupfeedback, StartupFeedbackEffect) -KWIN_EFFECT_SUPPORTED(startupfeedback, StartupFeedbackEffect::supported()) - // number of key frames for bouncing animation static const int BOUNCE_FRAMES = 20; // duration between two key frames in msec diff --git a/effects/taskbarthumbnail/taskbarthumbnail.cpp b/effects/taskbarthumbnail/taskbarthumbnail.cpp index 0321d6a19d..4f7dce7fb4 100644 --- a/effects/taskbarthumbnail/taskbarthumbnail.cpp +++ b/effects/taskbarthumbnail/taskbarthumbnail.cpp @@ -30,8 +30,6 @@ along with this program. If not, see . namespace KWin { -KWIN_EFFECT(taskbarthumbnail, TaskbarThumbnailEffect) - TaskbarThumbnailEffect::TaskbarThumbnailEffect() { atom = effects->announceSupportProperty("_KDE_WINDOW_PREVIEW", this); diff --git a/effects/thumbnailaside/thumbnailaside.cpp b/effects/thumbnailaside/thumbnailaside.cpp index 6a753a4f13..4be14275a2 100644 --- a/effects/thumbnailaside/thumbnailaside.cpp +++ b/effects/thumbnailaside/thumbnailaside.cpp @@ -30,8 +30,6 @@ along with this program. If not, see . namespace KWin { -KWIN_EFFECT(thumbnailaside, ThumbnailAsideEffect) - ThumbnailAsideEffect::ThumbnailAsideEffect() { QAction* a = new QAction(this); diff --git a/effects/trackmouse/trackmouse.cpp b/effects/trackmouse/trackmouse.cpp index 21ec1db665..77da7b4cd6 100644 --- a/effects/trackmouse/trackmouse.cpp +++ b/effects/trackmouse/trackmouse.cpp @@ -41,8 +41,6 @@ along with this program. If not, see . namespace KWin { -KWIN_EFFECT(trackmouse, TrackMouseEffect) - TrackMouseEffect::TrackMouseEffect() : m_active(false) , m_angle(0) diff --git a/effects/windowgeometry/windowgeometry.cpp b/effects/windowgeometry/windowgeometry.cpp index 3c20bb26b0..6086a2ce0c 100644 --- a/effects/windowgeometry/windowgeometry.cpp +++ b/effects/windowgeometry/windowgeometry.cpp @@ -33,8 +33,6 @@ along with this program. If not, see . using namespace KWin; -KWIN_EFFECT(windowgeometry, WindowGeometry) - WindowGeometry::WindowGeometry() { iAmActivated = true; diff --git a/effects/wobblywindows/wobblywindows.cpp b/effects/wobblywindows/wobblywindows.cpp index 271f7ba7e9..92b7637ab9 100644 --- a/effects/wobblywindows/wobblywindows.cpp +++ b/effects/wobblywindows/wobblywindows.cpp @@ -144,9 +144,6 @@ static const ParameterSet set_4 = { static const ParameterSet pset[5] = { set_0, set_1, set_2, set_3, set_4 }; -KWIN_EFFECT(wobblywindows, WobblyWindowsEffect) -KWIN_EFFECT_SUPPORTED(wobblywindows, WobblyWindowsEffect::supported()) - WobblyWindowsEffect::WobblyWindowsEffect() { reconfigure(ReconfigureAll); diff --git a/effects/zoom/zoom.cpp b/effects/zoom/zoom.cpp index 97848aee18..96d6a04a57 100644 --- a/effects/zoom/zoom.cpp +++ b/effects/zoom/zoom.cpp @@ -45,8 +45,6 @@ along with this program. If not, see . namespace KWin { -KWIN_EFFECT(zoom, ZoomEffect) - ZoomEffect::ZoomEffect() : Effect() , zoom(1)