mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 14:25:59 +01:00
parent
859841f4d1
commit
4868d4dfd3
3 changed files with 7 additions and 1 deletions
|
@ -112,6 +112,10 @@ CBox CBox::roundInternal() {
|
|||
return CBox{std::floor(x), std::floor(y), std::floor(newW), std::floor(newH)};
|
||||
}
|
||||
|
||||
CBox CBox::copy() const {
|
||||
return CBox{*this};
|
||||
}
|
||||
|
||||
Vector2D CBox::pos() const {
|
||||
return {x, y};
|
||||
}
|
||||
|
|
|
@ -52,6 +52,8 @@ class CBox {
|
|||
CBox& addExtents(const SWindowDecorationExtents& e);
|
||||
CBox& expand(const double& value);
|
||||
|
||||
CBox copy() const;
|
||||
|
||||
SWindowDecorationExtents extentsFrom(const CBox&); // this is the big box
|
||||
|
||||
Vector2D middle() const;
|
||||
|
|
|
@ -129,7 +129,7 @@ void CHyprDropShadowDecoration::draw(CMonitor* pMonitor, float a, const Vector2D
|
|||
CRegion saveDamage = g_pHyprOpenGL->m_RenderData.damage;
|
||||
|
||||
g_pHyprOpenGL->m_RenderData.damage = fullBox;
|
||||
g_pHyprOpenGL->m_RenderData.damage.subtract(windowBox.expand(-ROUNDING * pMonitor->scale)).intersect(saveDamage);
|
||||
g_pHyprOpenGL->m_RenderData.damage.subtract(windowBox.copy().expand(-ROUNDING * pMonitor->scale)).intersect(saveDamage);
|
||||
|
||||
alphaFB.bind();
|
||||
|
||||
|
|
Loading…
Reference in a new issue