mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-17 13:03:48 -07:00
internal: Remake borders as window decorations (#4104)
This commit is contained in:
@@ -116,13 +116,13 @@ void CHyprDropShadowDecoration::draw(CMonitor* pMonitor, float a, const Vector2D
|
||||
CBox withDecos = m_bLastWindowBoxWithDecos;
|
||||
|
||||
// get window box
|
||||
windowBox.translate(-pMonitor->vecPosition + WORKSPACEOFFSET).scale(pMonitor->scale).round();
|
||||
withDecos.translate(-pMonitor->vecPosition + WORKSPACEOFFSET).scale(pMonitor->scale).round();
|
||||
windowBox.translate(-pMonitor->vecPosition + WORKSPACEOFFSET);
|
||||
withDecos.translate(-pMonitor->vecPosition + WORKSPACEOFFSET);
|
||||
|
||||
auto scaledDecoExtents = withDecos.extentsFrom(windowBox).round();
|
||||
auto extentss = withDecos.extentsFrom(windowBox);
|
||||
|
||||
// add extents
|
||||
windowBox.addExtents(scaledDecoExtents).round();
|
||||
windowBox.addExtents(extentss).scale(pMonitor->scale).round();
|
||||
|
||||
if (windowBox.width < 1 || windowBox.height < 1)
|
||||
return; // prevent assert failed
|
||||
@@ -159,7 +159,7 @@ void CHyprDropShadowDecoration::draw(CMonitor* pMonitor, float a, const Vector2D
|
||||
|
||||
g_pHyprOpenGL->m_RenderData.damage = saveDamage;
|
||||
} else {
|
||||
g_pHyprOpenGL->renderRoundedShadow(&fullBox, ROUNDING * pMonitor->scale, *PSHADOWSIZE * pMonitor->scale, a);
|
||||
g_pHyprOpenGL->renderRoundedShadow(&fullBox, ROUNDING * pMonitor->scale, *PSHADOWSIZE * pMonitor->scale, m_pWindow->m_cRealShadowColor.col(), a);
|
||||
}
|
||||
|
||||
if (m_seExtents != m_seReportedExtents)
|
||||
|
Reference in New Issue
Block a user