Don't schedule repaint until Compositor is On

Summary: scheduleRepaint() and addRepaintFull() do nothing when m_state is not State::On.

Reviewers: #kwin, romangg

Reviewed By: #kwin, romangg

Subscribers: romangg, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D23590
This commit is contained in:
Vlad Zagorodniy 2019-09-05 10:39:20 +03:00
parent 2963c9ca56
commit d690d913fb

View file

@ -341,15 +341,10 @@ void Compositor::startupWithWorkspace()
vBlankInterval = milliToNano(1);
}
// This means "start now" - we don't have even a slight idea when the first vsync will occur.
m_timeSinceLastVBlank = fpsInterval - (options->vBlankTime() + 1);
scheduleRepaint();
// Sets also the 'effects' pointer.
kwinApp()->platform()->createEffectsHandler(this, m_scene);
connect(Workspace::self(), &Workspace::deletedRemoved, m_scene, &Scene::removeToplevel);
connect(effects, &EffectsHandler::screenGeometryChanged, this, &Compositor::addRepaintFull);
addRepaintFull();
for (Client *c : Workspace::self()->clientList()) {
c->setupCompositing();
@ -384,6 +379,7 @@ void Compositor::startupWithWorkspace()
}
// Render at least once.
addRepaintFull();
performCompositing();
}