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 95a2c3bf authored by Vlad Zahorodnii's avatar Vlad Zahorodnii

[libkwineffects] Emit a signal when active fullscreen effect changed

Summary:
Behaviour of some effects depends on presence of active fullscreen effect.
For example, Dim Inactive effect brightens windows if there is an active
fullscreen effect. If active fullscreen effect has been changed, these effects
might need to do some setup work, e.g. schedule repainting, toggle direction
of a timeline, etc.

For what it's worth, because the Dim Inactive effect doesn't schedule
repainting after leaving Desktop Grid, windows aren't dimmed back. One
need to move mouse to trigger dimming.

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D13701
parent 29ca2a1e
......@@ -620,7 +620,11 @@ void EffectsHandlerImpl::slotPaddingChanged(Toplevel* t, const QRect& old)
void EffectsHandlerImpl::setActiveFullScreenEffect(Effect* e)
{
if (fullscreen_effect == e) {
return;
}
fullscreen_effect = e;
emit activeFullScreenEffectChanged();
}
Effect* EffectsHandlerImpl::activeFullScreenEffect() const
......
......@@ -1695,6 +1695,15 @@ Q_SIGNALS:
**/
void xcbConnectionChanged();
/**
* This signal is emitted when active fullscreen effect changed.
*
* @see activeFullScreenEffect
* @see setActiveFullScreenEffect
* @since 5.14
**/
void activeFullScreenEffectChanged();
protected:
QVector< EffectPair > loaded_effects;
//QHash< QString, EffectFactory* > effect_factories;
......
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