mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-22 23:43:50 -07:00
fix custom rounding in shadow deco
This commit is contained in:
@@ -80,6 +80,8 @@ void CHyprDropShadowDecoration::draw(CMonitor* pMonitor, float a) {
|
|||||||
return; // cannot parse
|
return; // cannot parse
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const auto ROUNDING = !m_pWindow->m_sSpecialRenderData.rounding ? 0 : (m_pWindow->m_sAdditionalConfigData.rounding == -1 ? *PROUNDING : m_pWindow->m_sAdditionalConfigData.rounding);
|
||||||
|
|
||||||
// update the extents
|
// update the extents
|
||||||
m_seExtents = {{*PSHADOWSIZE + 2 - offset.x, *PSHADOWSIZE + 2 - offset.y}, {*PSHADOWSIZE + 2 + offset.x, *PSHADOWSIZE + 2 + offset.y}};
|
m_seExtents = {{*PSHADOWSIZE + 2 - offset.x, *PSHADOWSIZE + 2 - offset.y}, {*PSHADOWSIZE + 2 + offset.x, *PSHADOWSIZE + 2 + offset.y}};
|
||||||
|
|
||||||
@@ -114,14 +116,14 @@ void CHyprDropShadowDecoration::draw(CMonitor* pMonitor, float a) {
|
|||||||
return; // prevent assert failed
|
return; // prevent assert failed
|
||||||
}
|
}
|
||||||
|
|
||||||
g_pHyprOpenGL->renderRect(&windowBox, CColor(0,0,0,0), *PROUNDING * pMonitor->scale);
|
g_pHyprOpenGL->renderRect(&windowBox, CColor(0, 0, 0, 0), ROUNDING * pMonitor->scale);
|
||||||
|
|
||||||
glStencilFunc(GL_NOTEQUAL, 1, -1);
|
glStencilFunc(GL_NOTEQUAL, 1, -1);
|
||||||
glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
|
glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
|
||||||
}
|
}
|
||||||
|
|
||||||
scaleBox(&fullBox, pMonitor->scale);
|
scaleBox(&fullBox, pMonitor->scale);
|
||||||
g_pHyprOpenGL->renderRoundedShadow(&fullBox, *PROUNDING * pMonitor->scale, *PSHADOWSIZE * pMonitor->scale, a);
|
g_pHyprOpenGL->renderRoundedShadow(&fullBox, ROUNDING * pMonitor->scale, *PSHADOWSIZE * pMonitor->scale, a);
|
||||||
|
|
||||||
if (*PSHADOWIGNOREWINDOW) {
|
if (*PSHADOWIGNOREWINDOW) {
|
||||||
// cleanup
|
// cleanup
|
||||||
|
Reference in New Issue
Block a user