Commit 95a2c3bf authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

[libkwineffects] Emit a signal when active fullscreen effect changed

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:
parent 29ca2a1e
......@@ -620,7 +620,11 @@ void EffectsHandlerImpl::slotPaddingChanged(Toplevel* t, const QRect& old)
void EffectsHandlerImpl::setActiveFullScreenEffect(Effect* e)
if (fullscreen_effect == e) {
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();
QVector< EffectPair > loaded_effects;
//QHash< QString, EffectFactory* > effect_factories;
Supports Markdown
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