diff --git a/src/render/OpenGL.hpp b/src/render/OpenGL.hpp index 624878ff..be65cb85 100644 --- a/src/render/OpenGL.hpp +++ b/src/render/OpenGL.hpp @@ -65,7 +65,8 @@ struct SMonitorRenderData { }; struct SCurrentRenderData { - CMonitor* pMonitor = nullptr; + CMonitor* pMonitor = nullptr; + CWorkspace* pWorkspace = nullptr; float projection[9]; float savedProjection[9]; diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index e96be9cc..3ec3724a 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -1028,7 +1028,6 @@ void CHyprRenderer::renderMonitor(CMonitor* pMonitor) { } void CHyprRenderer::renderWorkspace(CMonitor* pMonitor, CWorkspace* pWorkspace, timespec* now, const wlr_box& geometry) { - Vector2D translate = {geometry.x, geometry.y}; float scale = (float)geometry.width / pMonitor->vecPixelSize.x; @@ -1038,7 +1037,9 @@ void CHyprRenderer::renderWorkspace(CMonitor* pMonitor, CWorkspace* pWorkspace, translate = Vector2D{}; } + g_pHyprOpenGL->m_RenderData.pWorkspace = pWorkspace; renderAllClientsForWorkspace(pMonitor, pWorkspace, now, translate, scale); + g_pHyprOpenGL->m_RenderData.pWorkspace = nullptr; } void CHyprRenderer::setWindowScanoutMode(CWindow* pWindow) {