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 7785c19f authored by Vlad Zahorodnii's avatar Vlad Zahorodnii

[effects/slidingpopups] Use single QHash to store animations

Summary:
This patch intends to simplify "management" of animations and reduce
QHash abuse.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D14096
parent 82ab1d1e
This diff is collapsed.
......@@ -60,13 +60,15 @@ public:
}
public Q_SLOTS:
void slotWindowAdded(KWin::EffectWindow *c);
void slotWindowClosed(KWin::EffectWindow *c);
void slotWindowDeleted(KWin::EffectWindow *w);
void slotPropertyNotify(KWin::EffectWindow *w, long a);
void slotWaylandSlideOnShowChanged(EffectWindow* w);
void slideIn(EffectWindow *w);
void slideOut(EffectWindow *w);
private:
void setupAnimData(EffectWindow *w);
void startForShow(EffectWindow *w);
enum Position {
West = 0,
......@@ -84,12 +86,21 @@ private:
};
long mAtom;
QHash< const EffectWindow*, TimeLine > mAppearingWindows;
QHash< const EffectWindow*, TimeLine > mDisappearingWindows;
QHash< const EffectWindow*, Data > mWindowsData;
int mSlideLength;
std::chrono::milliseconds mFadeInTime;
std::chrono::milliseconds mFadeOutTime;
enum class AnimationKind {
In,
Out
};
struct Animation {
AnimationKind kind;
TimeLine timeLine;
};
QHash<const EffectWindow*, Animation> m_animations;
};
} // namespace
......
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