From 5b0dc779ed91b08a9b0bfafb97b28f927dfdda0c Mon Sep 17 00:00:00 2001 From: Vaxry Date: Wed, 25 Oct 2023 22:20:58 +0100 Subject: [PATCH] renderer: blur properly behind small surfaces --- src/render/Renderer.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index f5a79bdf..290e5171 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -431,6 +431,12 @@ void CHyprRenderer::renderWindow(CWindow* pWindow, CMonitor* pMonitor, timespec* if ((pWindow->m_bIsX11 && *PXWLUSENN) || pWindow->m_sAdditionalConfigData.nearestNeighbor.toUnderlying()) g_pHyprOpenGL->m_RenderData.useNearestNeighbor = true; + if (pWindow->m_pWLSurface.small() && !pWindow->m_pWLSurface.m_bFillIgnoreSmall && renderdata.blur) { + wlr_box wb = {renderdata.x, renderdata.y, renderdata.w, renderdata.h}; + g_pHyprOpenGL->renderRectWithBlur(&wb, CColor(0, 0, 0, 0), renderdata.dontRound ? 0 : renderdata.rounding - 1); + renderdata.blur = false; + } + wlr_surface_for_each_surface(pWindow->m_pWLSurface.wlr(), renderSurface, &renderdata); g_pHyprOpenGL->m_RenderData.useNearestNeighbor = false;