From 5d5816be2bac29a7196a05d981d979bab6072ce6 Mon Sep 17 00:00:00 2001 From: Vlad Zagorodniy Date: Tue, 9 Oct 2018 18:44:07 +0300 Subject: [PATCH] [libkwineffects] Don't expose the fullscreen effect lock to the public API Summary: The fullscreen effect lock is purely an implementation detail of the AnimationEffect, we don't need to have it in the public API. Test Plan: KWin still compiles. Reviewers: #kwin, davidedmundson Reviewed By: #kwin, davidedmundson Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D16075 --- libkwineffects/anidata.cpp | 10 ++++++++++ libkwineffects/anidata_p.h | 14 ++++++++++++++ libkwineffects/kwinanimationeffect.cpp | 10 ---------- libkwineffects/kwinanimationeffect.h | 14 -------------- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/libkwineffects/anidata.cpp b/libkwineffects/anidata.cpp index 399e3e053d..edab6da1bc 100644 --- a/libkwineffects/anidata.cpp +++ b/libkwineffects/anidata.cpp @@ -31,6 +31,16 @@ QDebug operator<<(QDebug dbg, const KWin::AniData &a) using namespace KWin; static const int Gaussian = 46; +FullScreenEffectLock::FullScreenEffectLock(Effect *effect) +{ + effects->setActiveFullScreenEffect(effect); +} + +FullScreenEffectLock::~FullScreenEffectLock() +{ + effects->setActiveFullScreenEffect(nullptr); +} + AniData::AniData() : attribute(AnimationEffect::Opacity) , customCurve(0) // Linear diff --git a/libkwineffects/anidata_p.h b/libkwineffects/anidata_p.h index 741ea0eb93..0f53c164f7 100644 --- a/libkwineffects/anidata_p.h +++ b/libkwineffects/anidata_p.h @@ -27,6 +27,20 @@ along with this program. If not, see . namespace KWin { +/** + * Wraps effects->setActiveFullScreenEffect for the duration of it's lifespan + */ +class FullScreenEffectLock +{ +public: + FullScreenEffectLock(Effect *effect); + ~FullScreenEffectLock(); +private: + Q_DISABLE_COPY(FullScreenEffectLock) + void *d; //unused currently +}; +typedef QSharedPointer FullScreenEffectLockPtr; + class KWINEFFECTS_EXPORT AniData { public: AniData(); diff --git a/libkwineffects/kwinanimationeffect.cpp b/libkwineffects/kwinanimationeffect.cpp index 5fc1d03f90..5f0d8dc373 100644 --- a/libkwineffects/kwinanimationeffect.cpp +++ b/libkwineffects/kwinanimationeffect.cpp @@ -965,14 +965,4 @@ AnimationEffect::AniMap AnimationEffect::state() const return d->m_animations; } -FullScreenEffectLock::FullScreenEffectLock(Effect *effect) -{ - effects->setActiveFullScreenEffect(effect); -} - -FullScreenEffectLock::~FullScreenEffectLock() -{ - effects->setActiveFullScreenEffect(nullptr); -} - #include "moc_kwinanimationeffect.cpp" diff --git a/libkwineffects/kwinanimationeffect.h b/libkwineffects/kwinanimationeffect.h index 4736dc5be9..ce46f34493 100644 --- a/libkwineffects/kwinanimationeffect.h +++ b/libkwineffects/kwinanimationeffect.h @@ -88,20 +88,6 @@ private: bool valid; }; -/** - * Wraps effects->setActiveFullScreenEffect for the duration of it's lifespan - */ -class FullScreenEffectLock -{ -public: - FullScreenEffectLock(Effect *effect); - ~FullScreenEffectLock(); -private: - Q_DISABLE_COPY(FullScreenEffectLock) - void *d; //unused currently -}; -typedef QSharedPointer FullScreenEffectLockPtr; - class AniData; class AnimationEffectPrivate; class KWINEFFECTS_EXPORT AnimationEffect : public Effect