From 0ded63c464b256413fb73cd55b5b38d167d5cc12 Mon Sep 17 00:00:00 2001 From: Fushan Wen Date: Fri, 4 Feb 2022 22:13:47 +0800 Subject: [PATCH] effects: Don't emit `showingDesktopChanged` when `animated` is false --- src/effects.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/effects.cpp b/src/effects.cpp index 1859b8d381..23a5c5f788 100644 --- a/src/effects.cpp +++ b/src/effects.cpp @@ -139,8 +139,12 @@ EffectsHandlerImpl::EffectsHandlerImpl(Compositor *compositor, Scene *scene) Workspace *ws = Workspace::self(); VirtualDesktopManager *vds = VirtualDesktopManager::self(); - connect(ws, &Workspace::showingDesktopChanged, - this, &EffectsHandlerImpl::showingDesktopChanged); + connect(ws, &Workspace::showingDesktopChanged, this, + [this](bool showing, bool animated) { + if (animated) { + Q_EMIT showingDesktopChanged(showing); + } + }); connect(ws, &Workspace::currentDesktopChanged, this, [this](int old, AbstractClient *c) { const int newDesktop = VirtualDesktopManager::self()->current(); if (old != 0 && newDesktop != old) {