From b95c0c318e02a17be3eb7271b02141ab5c22a04f Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sun, 29 Oct 2023 20:54:14 +0000 Subject: [PATCH] renderer: fixup blend disable conditions in renderSurface Fixes #3680 --- src/render/Renderer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index ea662867..f202c2c5 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -76,7 +76,8 @@ void renderSurface(struct wlr_surface* surface, int x, int y, void* data) { if (RDATA->dontRound) rounding = 0; - const bool CANDISABLEBLEND = RDATA->alpha >= 1.f && rounding == 0 && surface->opaque; + const bool WINDOWOPAQUE = RDATA->pWindow && RDATA->pWindow->m_pWLSurface.wlr() == surface ? RDATA->pWindow->opaque() : false; + const bool CANDISABLEBLEND = RDATA->alpha * RDATA->fadeAlpha >= 1.f && rounding == 0 && (WINDOWOPAQUE || surface->opaque); if (CANDISABLEBLEND) g_pHyprOpenGL->blend(false);