opengl: keep current rendered workspace in renderData

This commit is contained in:
vaxerski 2023-04-17 23:47:12 +01:00
parent 385fe4e301
commit 1c50a11688
2 changed files with 4 additions and 2 deletions

View file

@ -65,7 +65,8 @@ struct SMonitorRenderData {
};
struct SCurrentRenderData {
CMonitor* pMonitor = nullptr;
CMonitor* pMonitor = nullptr;
CWorkspace* pWorkspace = nullptr;
float projection[9];
float savedProjection[9];

View file

@ -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) {