Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 5d5816be authored by Vlad Zahorodnii's avatar Vlad Zahorodnii

[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
parent 27bf3485
......@@ -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
......
......@@ -27,6 +27,20 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
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<FullScreenEffectLock> FullScreenEffectLockPtr;
class KWINEFFECTS_EXPORT AniData {
public:
AniData();
......
......@@ -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"
......@@ -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<FullScreenEffectLock> FullScreenEffectLockPtr;
class AniData;
class AnimationEffectPrivate;
class KWINEFFECTS_EXPORT AnimationEffect : public Effect
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment