From 274cd21d6302b93fcbab5f8f0a7aeb444ac08c17 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Thu, 4 Jul 2024 23:15:05 +0200 Subject: [PATCH] rollback on fail --- src/render/Renderer.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index e9edf2b9..33e6c25f 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -1418,6 +1418,9 @@ void CHyprRenderer::renderMonitor(CMonitor* pMonitor) { Aquamarine::eOutputPresentationMode::AQ_OUTPUT_PRESENTATION_VSYNC); if (!pMonitor->state.commit()) { + // rollback the buffer to avoid writing to the front buffer that is being + // displayed + pMonitor->output->swapchain->rollback(); pMonitor->damage.damageEntire(); return; }