renderer: fixup blend disable conditions in renderSurface

Fixes #3680
This commit is contained in:
Vaxry 2023-10-29 20:54:14 +00:00
parent 9abfa9efc6
commit b95c0c318e

View file

@ -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);