diff options
| author | Vaxry <vaxry@vaxry.net> | 2023-10-29 20:54:14 +0000 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2023-10-29 20:54:14 +0000 |
| commit | b95c0c318e02a17be3eb7271b02141ab5c22a04f (patch) | |
| tree | f0ee0c69d3bde935fe8925bad26d84ce6bc6fe03 /src/render/Renderer.cpp | |
| parent | 9abfa9efc627df0765652f862887626af02b5ae1 (diff) | |
renderer: fixup blend disable conditions in renderSurface
Fixes #3680
Diffstat (limited to 'src/render/Renderer.cpp')
| -rw-r--r-- | src/render/Renderer.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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); |
