From d909ef53d694218149386c9ae5ca2d050fefb042 Mon Sep 17 00:00:00 2001 From: taj-ny <79316397+taj-ny@users.noreply.github.com> Date: Wed, 16 Oct 2024 23:13:32 +0200 Subject: [PATCH] kwin: GesturesEffect -> Effect --- src/kwin/CMakeLists.txt | 2 +- src/kwin/{gestureseffect.cpp => effect.cpp} | 8 ++++---- src/kwin/{gestureseffect.h => effect.h} | 6 +++--- src/kwin/main.cpp | 22 ++++++++++----------- 4 files changed, 19 insertions(+), 19 deletions(-) rename src/kwin/{gestureseffect.cpp => effect.cpp} (81%) rename src/kwin/{gestureseffect.h => effect.h} (84%) diff --git a/src/kwin/CMakeLists.txt b/src/kwin/CMakeLists.txt index 90e2304..6cae310 100644 --- a/src/kwin/CMakeLists.txt +++ b/src/kwin/CMakeLists.txt @@ -2,7 +2,7 @@ set(kwin_gestures_SOURCES config/config.cpp impl/kwinvirtualinputdevice.cpp impl/kwinwindowdataprovider.cpp - gestureseffect.cpp + effect.cpp inputfilter.cpp main.cpp ) diff --git a/src/kwin/gestureseffect.cpp b/src/kwin/effect.cpp similarity index 81% rename from src/kwin/gestureseffect.cpp rename to src/kwin/effect.cpp index ea7f848..b20c6e9 100644 --- a/src/kwin/gestureseffect.cpp +++ b/src/kwin/effect.cpp @@ -1,8 +1,8 @@ #include "config/config.h" -#include "gestureseffect.h" +#include "effect.h" #include "input.h" -GesturesEffect::GesturesEffect() +Effect::Effect() : m_inputEventFilter(std::make_shared()), m_virtualInputDevice(std::make_shared()), m_windowDataProvider(std::make_shared()) @@ -16,12 +16,12 @@ GesturesEffect::GesturesEffect() reconfigure(ReconfigureAll); } -GesturesEffect::~GesturesEffect() +Effect::~Effect() { KWin::input()->uninstallInputEventFilter(m_inputEventFilter.get()); } -void GesturesEffect::reconfigure(ReconfigureFlags flags) +void Effect::reconfigure(ReconfigureFlags flags) { Q_UNUSED(flags) diff --git a/src/kwin/gestureseffect.h b/src/kwin/effect.h similarity index 84% rename from src/kwin/gestureseffect.h rename to src/kwin/effect.h index 5fa63c3..dca5fa2 100644 --- a/src/kwin/gestureseffect.h +++ b/src/kwin/effect.h @@ -5,11 +5,11 @@ #include "impl/kwinwindowdataprovider.h" #include "inputfilter.h" -class GesturesEffect : public KWin::Effect +class Effect : public KWin::Effect { public: - GesturesEffect(); - ~GesturesEffect() override; + Effect(); + ~Effect() override; static bool supported() { return true; }; static bool enabledByDefault() { return false; }; diff --git a/src/kwin/main.cpp b/src/kwin/main.cpp index 96e0b68..c852229 100644 --- a/src/kwin/main.cpp +++ b/src/kwin/main.cpp @@ -1,14 +1,14 @@ -#include "gestureseffect.h" +#include "effect/effect.h" +#include "effect.h" + +KWIN_EFFECT_FACTORY_SUPPORTED_ENABLED +( + Effect, + "metadata.json", + return Effect::supported(); + , + return Effect::enabledByDefault(); +) -namespace KWin -{ - -KWIN_EFFECT_FACTORY_SUPPORTED_ENABLED(GesturesEffect, - "metadata.json", - return GesturesEffect::supported(); - , - return GesturesEffect::enabledByDefault();) - -} // namespace KWin #include "main.moc"