summaryrefslogtreecommitdiff
path: root/src/render/OpenGL.cpp
diff options
context:
space:
mode:
authorvaxerski <vaxry@vaxry.net>2023-11-16 12:24:07 +0000
committervaxerski <vaxry@vaxry.net>2023-11-16 12:24:07 +0000
commit859841f4d1ceb4060dcfcd2a94976805eaa39d62 (patch)
tree03af7a7a90edbf7e47fb069a3de6f72e61acd33a /src/render/OpenGL.cpp
parent28ef18a92112d57a425839a1993a1191af2fb6f3 (diff)
renderer: don't make snapshots of invisible windows on close
Diffstat (limited to 'src/render/OpenGL.cpp')
-rw-r--r--src/render/OpenGL.cpp3
1 files changed, 3 insertions, 0 deletions
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