From a4a4fffffb74eb40a8ab9cf4606a3edbb4e9fbd9 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sun, 22 Dec 2024 22:07:08 +0000 Subject: renderer: allow plugins to know what window was rendered in post --- src/render/Renderer.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index 0f8db3bb..d8b8a847 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -555,7 +555,7 @@ void CHyprRenderer::renderWindow(PHLWINDOW pWindow, PHLMONITOR pMonitor, timespe }, nullptr); - g_pHyprOpenGL->m_RenderData.useNearestNeighbor = false; + renderdata.useNearestNeighbor = false; if (renderdata.decorate) { 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); + + g_pHyprOpenGL->m_RenderData.currentWindow.reset(); } void CHyprRenderer::renderLayer(PHLLS pLayer, PHLMONITOR pMonitor, timespec* time, bool popups) { -- cgit v1.2.3