fix shadows on scaled

This commit is contained in:
vaxerski 2022-06-29 11:13:30 +02:00
parent 6213328d2c
commit 9388bb5d55

View file

@ -99,6 +99,8 @@ void CHyprDropShadowDecoration::draw(SMonitor* pMonitor, float a) {
glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
wlr_box windowBox = {m_vLastWindowPos.x - pMonitor->vecPosition.x, m_vLastWindowPos.y - pMonitor->vecPosition.y, m_vLastWindowSize.x, m_vLastWindowSize.y};
scaleBox(&windowBox, pMonitor->scale);
if (windowBox.width < 1 || windowBox.height < 1) {
glDisable(GL_STENCIL_TEST);
@ -110,7 +112,8 @@ void CHyprDropShadowDecoration::draw(SMonitor* pMonitor, float a) {
glStencilFunc(GL_NOTEQUAL, 1, -1);
glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
}
scaleBox(&fullBox, pMonitor->scale);
g_pHyprOpenGL->renderRoundedShadow(&fullBox, *PROUNDING, *PSHADOWSIZE, a);
if (*PSHADOWIGNOREWINDOW) {