renderer: allow plugins to know what window was rendered in post

This commit is contained in:
Vaxry 2024-12-22 22:07:08 +00:00
parent 1830296df3
commit a4a4fffffb

View file

@ -555,7 +555,7 @@ void CHyprRenderer::renderWindow(PHLWINDOW pWindow, PHLMONITOR pMonitor, timespe
}, },
nullptr); nullptr);
g_pHyprOpenGL->m_RenderData.useNearestNeighbor = false; renderdata.useNearestNeighbor = false;
if (renderdata.decorate) { if (renderdata.decorate) {
for (auto const& wd : pWindow->m_dWindowDecorations) { for (auto const& wd : pWindow->m_dWindowDecorations) {
@ -638,7 +638,12 @@ void CHyprRenderer::renderWindow(PHLWINDOW pWindow, PHLMONITOR pMonitor, timespe
} }
} }
// for plugins
g_pHyprOpenGL->m_RenderData.currentWindow = pWindow;
EMIT_HOOK_EVENT("render", RENDER_POST_WINDOW); EMIT_HOOK_EVENT("render", RENDER_POST_WINDOW);
g_pHyprOpenGL->m_RenderData.currentWindow.reset();
} }
void CHyprRenderer::renderLayer(PHLLS pLayer, PHLMONITOR pMonitor, timespec* time, bool popups) { void CHyprRenderer::renderLayer(PHLLS pLayer, PHLMONITOR pMonitor, timespec* time, bool popups) {