effects: Don't emit showingDesktopChanged
when animated
is false
This commit is contained in:
parent
c85bb35c98
commit
0ded63c464
1 changed files with 6 additions and 2 deletions
|
@ -139,8 +139,12 @@ EffectsHandlerImpl::EffectsHandlerImpl(Compositor *compositor, Scene *scene)
|
||||||
|
|
||||||
Workspace *ws = Workspace::self();
|
Workspace *ws = Workspace::self();
|
||||||
VirtualDesktopManager *vds = VirtualDesktopManager::self();
|
VirtualDesktopManager *vds = VirtualDesktopManager::self();
|
||||||
connect(ws, &Workspace::showingDesktopChanged,
|
connect(ws, &Workspace::showingDesktopChanged, this,
|
||||||
this, &EffectsHandlerImpl::showingDesktopChanged);
|
[this](bool showing, bool animated) {
|
||||||
|
if (animated) {
|
||||||
|
Q_EMIT showingDesktopChanged(showing);
|
||||||
|
}
|
||||||
|
});
|
||||||
connect(ws, &Workspace::currentDesktopChanged, this, [this](int old, AbstractClient *c) {
|
connect(ws, &Workspace::currentDesktopChanged, this, [this](int old, AbstractClient *c) {
|
||||||
const int newDesktop = VirtualDesktopManager::self()->current();
|
const int newDesktop = VirtualDesktopManager::self()->current();
|
||||||
if (old != 0 && newDesktop != old) {
|
if (old != 0 && newDesktop != old) {
|
||||||
|
|
Loading…
Reference in a new issue