borders-plus-plus: update for hyprland

This commit is contained in:
vaxerski
2023-10-10 20:13:15 +01:00
parent efd7a19069
commit ac6bc07346
2 changed files with 7 additions and 3 deletions

View File

@ -5,7 +5,7 @@
#include "globals.hpp"
CBordersPlusPlus::CBordersPlusPlus(CWindow* pWindow) : IHyprWindowDecoration(pWindow) {
CBordersPlusPlus::CBordersPlusPlus(CWindow* pWindow) : IHyprWindowDecoration(pWindow), m_pWindow(pWindow) {
m_vLastWindowPos = pWindow->m_vRealPosition.vec();
m_vLastWindowSize = pWindow->m_vRealSize.vec();
}
@ -58,7 +58,7 @@ void CBordersPlusPlus::draw(CMonitor* pMonitor, float a, const Vector2D& offset)
g_pHyprOpenGL->scissor((wlr_box*)nullptr);
scaleBox(&fullBox, pMonitor->scale);
g_pHyprOpenGL->renderBorder(&fullBox, CColor(*PCOLOR1), *PROUNDING == 0 ? 0 : *PROUNDING * pMonitor->scale + *PBORDERSIZE * 2, a);
g_pHyprOpenGL->renderBorder(&fullBox, CColor(*PCOLOR1), *PROUNDING == 0 ? 0 : *PROUNDING * pMonitor->scale + *PBORDERSIZE * 2, *PBORDERSIZE, a);
// pass 2
@ -84,7 +84,7 @@ void CBordersPlusPlus::draw(CMonitor* pMonitor, float a, const Vector2D& offset)
g_pHyprOpenGL->scissor((wlr_box*)nullptr);
scaleBox(&fullBox, pMonitor->scale);
g_pHyprOpenGL->renderBorder(&fullBox, CColor(*PCOLOR2), *PROUNDING == 0 ? 0 : *PROUNDING * pMonitor->scale + *PBORDERSIZE * 4, a);
g_pHyprOpenGL->renderBorder(&fullBox, CColor(*PCOLOR2), *PROUNDING == 0 ? 0 : *PROUNDING * pMonitor->scale + *PBORDERSIZE * 4, *PBORDERSIZE, a);
}
eDecorationType CBordersPlusPlus::getDecorationType() {