diff options
Diffstat (limited to 'example/examplePlugin/customDecoration.cpp')
-rw-r--r-- | example/examplePlugin/customDecoration.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/example/examplePlugin/customDecoration.cpp b/example/examplePlugin/customDecoration.cpp index 52b8b715..e2b5d136 100644 --- a/example/examplePlugin/customDecoration.cpp +++ b/example/examplePlugin/customDecoration.cpp @@ -33,8 +33,8 @@ void CCustomDecoration::draw(CMonitor* pMonitor, float a, const Vector2D& offset (m_pWindow->m_sAdditionalConfigData.rounding.toUnderlying() == -1 ? *PROUNDING : m_pWindow->m_sAdditionalConfigData.rounding.toUnderlying()); // draw the border - wlr_box fullBox = {(int)(m_vLastWindowPos.x - *PBORDERSIZE), (int)(m_vLastWindowPos.y - *PBORDERSIZE), (int)(m_vLastWindowSize.x + 2.0 * *PBORDERSIZE), - (int)(m_vLastWindowSize.y + 2.0 * *PBORDERSIZE)}; + CBox fullBox = {(int)(m_vLastWindowPos.x - *PBORDERSIZE), (int)(m_vLastWindowPos.y - *PBORDERSIZE), (int)(m_vLastWindowSize.x + 2.0 * *PBORDERSIZE), + (int)(m_vLastWindowSize.y + 2.0 * *PBORDERSIZE)}; fullBox.x -= pMonitor->vecPosition.x; fullBox.y -= pMonitor->vecPosition.y; @@ -49,9 +49,9 @@ void CCustomDecoration::draw(CMonitor* pMonitor, float a, const Vector2D& offset if (fullBox.width < 1 || fullBox.height < 1) return; // don't draw invisible shadows - g_pHyprOpenGL->scissor((wlr_box*)nullptr); + g_pHyprOpenGL->scissor((CBox*)nullptr); - scaleBox(&fullBox, pMonitor->scale); + fullBox.scale(pMonitor->scale); g_pHyprOpenGL->renderBorder(&fullBox, CColor(*PCOLOR), *PROUNDING * pMonitor->scale + *PBORDERSIZE * 2, a); } @@ -68,7 +68,7 @@ void CCustomDecoration::updateWindow(CWindow* pWindow) { } void CCustomDecoration::damageEntire() { - wlr_box dm = {(int)(m_vLastWindowPos.x - m_seExtents.topLeft.x), (int)(m_vLastWindowPos.y - m_seExtents.topLeft.y), - (int)(m_vLastWindowSize.x + m_seExtents.topLeft.x + m_seExtents.bottomRight.x), (int)m_seExtents.topLeft.y}; + CBox dm = {(int)(m_vLastWindowPos.x - m_seExtents.topLeft.x), (int)(m_vLastWindowPos.y - m_seExtents.topLeft.y), + (int)(m_vLastWindowSize.x + m_seExtents.topLeft.x + m_seExtents.bottomRight.x), (int)m_seExtents.topLeft.y}; g_pHyprRenderer->damageBox(&dm); }
\ No newline at end of file |