diff --git a/composite.cpp b/composite.cpp index 4b81c97be7..e1f1856517 100644 --- a/composite.cpp +++ b/composite.cpp @@ -640,6 +640,13 @@ void Compositor::performCompositing() return; } + // If outputs are disabled, we return to the event loop and + // continue processing events until the outputs are enabled again + if (waylandServer() && !waylandServer()->backend()->areOutputsEnabled()) { + compositeTimer.stop(); + return; + } + // Create a list of all windows in the stacking order ToplevelList windows = Workspace::self()->xStackingOrder(); ToplevelList damaged; @@ -773,6 +780,11 @@ void Compositor::setCompositeTimer() if (m_bufferSwapPending && m_composeAtSwapCompletion) return; + // Don't start the timer if all outputs are disabled + if (waylandServer() && !waylandServer()->backend()->areOutputsEnabled()) { + return; + } + uint waitTime = 1; if (m_scene->blocksForRetrace()) {