diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-08-05 19:23:53 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-08-05 19:23:53 +0200 |
| commit | d72f1cc644b30b1517d5a1725fb9014cffde5642 (patch) | |
| tree | 1c65e4ed8f12aeb839505ea6461f27c72b10219b /src/render | |
| parent | 78e4f274bc0b9318178602343b73843e9a381560 (diff) | |
fix various shadow damage issues
Diffstat (limited to 'src/render')
| -rw-r--r-- | src/render/decorations/CHyprDropShadowDecoration.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/render/decorations/CHyprDropShadowDecoration.cpp b/src/render/decorations/CHyprDropShadowDecoration.cpp index 0a937059..33ed3be4 100644 --- a/src/render/decorations/CHyprDropShadowDecoration.cpp +++ b/src/render/decorations/CHyprDropShadowDecoration.cpp @@ -92,12 +92,14 @@ void CHyprDropShadowDecoration::draw(CMonitor* pMonitor, float a) { if (fullBox.width < 1 || fullBox.height < 1) return; // don't draw invisible shadows + g_pHyprOpenGL->scissor((wlr_box *)nullptr); + if (*PSHADOWIGNOREWINDOW) { + glEnable(GL_STENCIL_TEST); + glClearStencil(0); glClear(GL_STENCIL_BUFFER_BIT); - glEnable(GL_STENCIL_TEST); - glStencilFunc(GL_ALWAYS, 1, -1); glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE); @@ -106,8 +108,10 @@ void CHyprDropShadowDecoration::draw(CMonitor* pMonitor, float a) { scaleBox(&windowBox, pMonitor->scale); if (windowBox.width < 1 || windowBox.height < 1) { - glDisable(GL_STENCIL_TEST); - return; // prevent assert failed + glClearStencil(0); + glClear(GL_STENCIL_BUFFER_BIT); + glDisable(GL_STENCIL_TEST); + return; // prevent assert failed } g_pHyprOpenGL->renderRect(&windowBox, CColor(0,0,0,0), *PROUNDING); |
