From d690d913fb8e9b560e0a407d7c086ace0320786d Mon Sep 17 00:00:00 2001 From: Vlad Zagorodniy Date: Thu, 5 Sep 2019 10:39:20 +0300 Subject: [PATCH] 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 --- composite.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/composite.cpp b/composite.cpp index dd6001e8f1..08bf82952f 100644 --- a/composite.cpp +++ b/composite.cpp @@ -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(); }