aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorVaxry <[email protected]>2023-11-04 22:25:09 +0000
committerVaxry <[email protected]>2023-11-04 22:25:09 +0000
commit56dec1c6a28c59b11c00e1b727517484ec4fb5ac (patch)
tree8db9b98ecfe5cd31fc6baa3876209c9182c08737
parent931927de29256a46004cd6f71fdf45ed76470b73 (diff)
downloadHyprland-56dec1c6a28c59b11c00e1b727517484ec4fb5ac.tar.gz
Hyprland-56dec1c6a28c59b11c00e1b727517484ec4fb5ac.zip
renderer: properly set currentFB on snapshot renders
-rw-r--r--src/render/OpenGL.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp
index b8028c3f..690b0ede 100644
--- a/src/render/OpenGL.cpp
+++ b/src/render/OpenGL.cpp
@@ -1495,6 +1495,8 @@ void CHyprOpenGLImpl::makeRawWindowSnapshot(CWindow* pWindow, CFramebuffer* pFra
pFramebuffer->bind();
+ m_RenderData.currentFB = pFramebuffer;
+
clear(CColor(0, 0, 0, 0)); // JIC
g_pHyprRenderer->renderWindow(pWindow, PMONITOR, &now, false, RENDER_PASS_ALL, true);
@@ -1553,6 +1555,8 @@ void CHyprOpenGLImpl::makeWindowSnapshot(CWindow* pWindow) {
PFRAMEBUFFER->bind();
+ m_RenderData.currentFB = PFRAMEBUFFER;
+
clear(CColor(0, 0, 0, 0)); // JIC
g_pHyprRenderer->renderWindow(pWindow, PMONITOR, &now, !pWindow->m_bX11DoesntWantBorders, RENDER_PASS_ALL);
@@ -1598,6 +1602,8 @@ void CHyprOpenGLImpl::makeLayerSnapshot(SLayerSurface* pLayer) {
PFRAMEBUFFER->bind();
+ m_RenderData.currentFB = PFRAMEBUFFER;
+
clear(CColor(0, 0, 0, 0)); // JIC
timespec now;