From 859841f4d1ceb4060dcfcd2a94976805eaa39d62 Mon Sep 17 00:00:00 2001 From: vaxerski Date: Thu, 16 Nov 2023 12:24:07 +0000 Subject: [PATCH] renderer: don't make snapshots of invisible windows on close --- src/render/OpenGL.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp index 826854ed..a7441a41 100644 --- a/src/render/OpenGL.cpp +++ b/src/render/OpenGL.cpp @@ -1535,6 +1535,9 @@ void CHyprOpenGLImpl::makeWindowSnapshot(CWindow* pWindow) { if (!PMONITOR || !PMONITOR->output || PMONITOR->vecPixelSize.x <= 0 || PMONITOR->vecPixelSize.y <= 0) return; + if (!g_pHyprRenderer->shouldRenderWindow(pWindow)) + return; // ignore, window is not being rendered + wlr_output_attach_render(PMONITOR->output, nullptr); // we need to "damage" the entire monitor