Skip to content

Commit

Permalink
all: chase hyprland
Browse files Browse the repository at this point in the history
  • Loading branch information
vaxerski committed Mar 31, 2024
1 parent 826d47b commit e45066d
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions borders-plus-plus/borderDeco.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ std::string CBordersPlusPlus::getDisplayName() {
return "Borders++";
}

void CBordersPlusPlus::draw(CMonitor* pMonitor, float a, const Vector2D& offset) {
void CBordersPlusPlus::draw(CMonitor* pMonitor, float a) {
if (!g_pCompositor->windowValidMapped(m_pWindow))
return;

Expand Down Expand Up @@ -88,7 +88,7 @@ void CBordersPlusPlus::draw(CMonitor* pMonitor, float a, const Vector2D& offset)
const auto ORIGINALROUND = rounding == 0 ? 0 : m_pWindow->rounding() * pMonitor->scale + **PBORDERSIZE;
CBox fullBox = {m_vLastWindowPos.x, m_vLastWindowPos.y, m_vLastWindowSize.x, m_vLastWindowSize.y};

fullBox.translate(offset - pMonitor->vecPosition + WORKSPACEOFFSET).scale(pMonitor->scale);
fullBox.translate(m_pWindow->m_vFloatingOffset - pMonitor->vecPosition + WORKSPACEOFFSET).scale(pMonitor->scale);

double fullThickness = 0;

Expand Down
2 changes: 1 addition & 1 deletion borders-plus-plus/borderDeco.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class CBordersPlusPlus : public IHyprWindowDecoration {

virtual void onPositioningReply(const SDecorationPositioningReply& reply);

virtual void draw(CMonitor*, float a, const Vector2D& offset);
virtual void draw(CMonitor*, float a);

virtual eDecorationType getDecorationType();

Expand Down
8 changes: 4 additions & 4 deletions hyprbars/barDeco.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ void CHyprBar::renderBarButtonsText(CBox* barBox, const float scale, const float
}
}

void CHyprBar::draw(CMonitor* pMonitor, float a, const Vector2D& offset) {
void CHyprBar::draw(CMonitor* pMonitor, float a) {
if (!g_pCompositor->windowValidMapped(m_pWindow))
return;

Expand Down Expand Up @@ -415,7 +415,7 @@ void CHyprBar::draw(CMonitor* pMonitor, float a, const Vector2D& offset) {
CBox titleBarBox = {DECOBOX.x - pMonitor->vecPosition.x, DECOBOX.y - pMonitor->vecPosition.y, DECOBOX.w,
DECOBOX.h + ROUNDING * 3 /* to fill the bottom cuz we can't disable rounding there */};

titleBarBox.translate(offset).scale(pMonitor->scale).round();
titleBarBox.translate(m_pWindow->m_vFloatingOffset).scale(pMonitor->scale).round();

if (titleBarBox.w < 1 || titleBarBox.h < 1)
return;
Expand All @@ -424,8 +424,8 @@ void CHyprBar::draw(CMonitor* pMonitor, float a, const Vector2D& offset) {

if (ROUNDING) {
// the +1 is a shit garbage temp fix until renderRect supports an alpha matte
CBox windowBox = {m_pWindow->m_vRealPosition.value().x + offset.x - pMonitor->vecPosition.x + 1,
m_pWindow->m_vRealPosition.value().y + offset.y - pMonitor->vecPosition.y + 1, m_pWindow->m_vRealSize.value().x - 2,
CBox windowBox = {m_pWindow->m_vRealPosition.value().x + m_pWindow->m_vFloatingOffset.x - pMonitor->vecPosition.x + 1,
m_pWindow->m_vRealPosition.value().y + m_pWindow->m_vFloatingOffset.y - pMonitor->vecPosition.y + 1, m_pWindow->m_vRealSize.value().x - 2,
m_pWindow->m_vRealSize.value().y - 2};

if (windowBox.w < 1 || windowBox.h < 1)
Expand Down
2 changes: 1 addition & 1 deletion hyprbars/barDeco.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class CHyprBar : public IHyprWindowDecoration {

virtual void onPositioningReply(const SDecorationPositioningReply& reply);

virtual void draw(CMonitor*, float a, const Vector2D& offset);
virtual void draw(CMonitor*, float a);

virtual eDecorationType getDecorationType();

Expand Down
2 changes: 1 addition & 1 deletion hyprtrails/trail.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Vector2D vecForBezierT(const float& t, const std::vector<Vector2D>& verts) {
return pts[0];
}

void CTrail::draw(CMonitor* pMonitor, float a, const Vector2D& offset) {
void CTrail::draw(CMonitor* pMonitor, float a) {
if (!g_pCompositor->windowValidMapped(m_pWindow))
return;

Expand Down
2 changes: 1 addition & 1 deletion hyprtrails/trail.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class CTrail : public IHyprWindowDecoration {

virtual void onPositioningReply(const SDecorationPositioningReply& reply);

virtual void draw(CMonitor*, float a, const Vector2D& offset);
virtual void draw(CMonitor*, float a);

virtual eDecorationType getDecorationType();

Expand Down

0 comments on commit e45066d

Please sign in to comment.