/* KWin - the KDE window manager This file is part of the KDE project. SPDX-FileCopyrightText: 2009 Lucas Murray SPDX-License-Identifier: GPL-2.0-or-later */ #ifndef KWIN_HIGHLIGHTWINDOW_H #define KWIN_HIGHLIGHTWINDOW_H #include namespace KWin { class HighlightWindowEffect : public AnimationEffect { Q_OBJECT public: HighlightWindowEffect(); int requestedEffectChainPosition() const override { return 70; } bool provides(Feature feature) override; bool perform(Feature feature, const QVariantList &arguments) override; public Q_SLOTS: void slotWindowAdded(KWin::EffectWindow* w); void slotWindowClosed(KWin::EffectWindow *w); void slotWindowDeleted(KWin::EffectWindow *w); void slotPropertyNotify(KWin::EffectWindow* w, long atom, EffectWindow *addedWindow = nullptr); private: void startGhostAnimation(EffectWindow *window, int duration = -1); void startHighlightAnimation(EffectWindow *window, int duration = -1); void startRevertAnimation(EffectWindow *window); bool isHighlighted(EffectWindow *window) const; void prepareHighlighting(); void finishHighlighting(); void highlightWindows(const QVector &windows); long m_atom; QList m_highlightedWindows; QHash m_animations; QEasingCurve m_easingCurve; int m_fadeDuration; EffectWindow *m_monitorWindow; QList m_highlightedIds; float m_ghostOpacity = 0.15; }; } // namespace #endif