Set compositor On status before setupCompositing()

This is needed to ensure that Compositor::compositing() returns true
when Toplevel::setupCompositing() is called.
This commit is contained in:
Vlad Zahorodnii 2021-06-10 08:54:39 +03:00
parent d74e81bdd0
commit ae70b17c79

View file

@ -330,6 +330,8 @@ void Compositor::startupWithWorkspace()
registerRenderLoop(platform->renderLoop(), nullptr);
}
m_state = State::On;
// Sets also the 'effects' pointer.
kwinApp()->platform()->createEffectsHandler(this, m_scene);
connect(Workspace::self(), &Workspace::deletedRemoved, m_scene, &Scene::removeToplevel);
@ -356,7 +358,6 @@ void Compositor::startupWithWorkspace()
}
}
m_state = State::On;
Q_EMIT compositingToggled(true);
if (m_releaseSelectionTimer.isActive()) {