summaryrefslogtreecommitdiff
path: root/src/render/OpenGL.cpp
diff options
context:
space:
mode:
authorvaxerski <vaxry@vaxry.net>2023-11-24 12:32:35 +0000
committervaxerski <vaxry@vaxry.net>2023-11-24 12:32:35 +0000
commit802ab58f8a129b42d61ec13898fd978e0920f7d8 (patch)
tree99d89a65a3e9b440543a26f2a7ba89bcce7789f4 /src/render/OpenGL.cpp
parentaf5d06593f83344e20537ad5ec7a780eda4fce87 (diff)
renderer: fix inverseOpaque calcs in renderWithBlur
Diffstat (limited to 'src/render/OpenGL.cpp')
-rw-r--r--src/render/OpenGL.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp
index 119d522b..622a211d 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);