From 802ab58f8a129b42d61ec13898fd978e0920f7d8 Mon Sep 17 00:00:00 2001 From: vaxerski Date: Fri, 24 Nov 2023 12:32:35 +0000 Subject: [PATCH] renderer: fix inverseOpaque calcs in renderWithBlur --- src/render/OpenGL.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp index 119d522b2..622a211dd 100644 --- a/src/render/OpenGL.cpp +++ b/src/render/OpenGL.cpp @@ -1314,7 +1314,8 @@ void CHyprOpenGLImpl::renderTextureWithBlur(const CTexture& tex, CBox* pBox, flo // amazing hack: the surface has an opaque region! CRegion inverseOpaque; - if (a >= 1.f) { + if (a >= 1.f && std::round(pSurface->current.width * m_RenderData.pMonitor->scale) == pBox->w && + std::round(pSurface->current.height * m_RenderData.pMonitor->scale) == pBox->h) { pixman_box32_t surfbox = {0, 0, pSurface->current.width * pSurface->current.scale, pSurface->current.height * pSurface->current.scale}; inverseOpaque = &pSurface->current.opaque; inverseOpaque.invert(&surfbox).intersect(0, 0, pSurface->current.width * pSurface->current.scale, pSurface->current.height * pSurface->current.scale);