diff --git a/flake.lock b/flake.lock index ef5e126..8cb6ce6 100644 --- a/flake.lock +++ b/flake.lock @@ -9,11 +9,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1698945632, - "narHash": "sha256-D49t5G6JBDLRZv5nrMoOoC4J611z1S0LQ7RkNImpGI0=", + "lastModified": 1699144342, + "narHash": "sha256-QqWHFZCIyEKrMt0M/ErboC4uL3ASDNDDJjBw5O7MXhw=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "f10996b5753bfc854b019f6889d6bc0c91961e3f", + "rev": "3b786419d817a76b834d5e010afbed4d0cf98804", "type": "github" }, "original": { diff --git a/src/Hy3Node.cpp b/src/Hy3Node.cpp index 33c5663..99c2b47 100644 --- a/src/Hy3Node.cpp +++ b/src/Hy3Node.cpp @@ -1,6 +1,7 @@ #include #include +#include #include #include "Hy3Node.hpp" @@ -354,7 +355,7 @@ void Hy3Node::recalcSizePosRecursive(bool no_animation) { { group->focused_child->setHidden(false); - auto box = wlr_box {tpos.x, tpos.y, tsize.x, tsize.y}; + auto box = CBox {tpos.x, tpos.y, tsize.x, tsize.y}; g_pHyprRenderer->damageBox(&box); } diff --git a/src/TabGroup.cpp b/src/TabGroup.cpp index afa40d5..28ced1d 100644 --- a/src/TabGroup.cpp +++ b/src/TabGroup.cpp @@ -2,6 +2,7 @@ #include #include +#include #include #include #include @@ -123,7 +124,7 @@ bool Hy3TabBarEntry::shouldRemove() { return this->destroying && (this->vertical_pos.fl() == 1.0 || this->width.fl() == 0.0); } -void Hy3TabBarEntry::prepareTexture(float scale, wlr_box& box) { +void Hy3TabBarEntry::prepareTexture(float scale, CBox& box) { // clang-format off static const auto* s_rounding = &HyprlandAPI::getConfigValue(PHANDLE, "plugin:hy3:tabs:rounding")->intValue; static const auto* render_text = &HyprlandAPI::getConfigValue(PHANDLE, "plugin:hy3:tabs:render_text")->intValue; @@ -500,7 +501,7 @@ void Hy3TabGroup::tick() { auto size = this->size.vec(); if (this->last_pos != pos || this->last_size != size) { - wlr_box damage_box = {this->last_pos.x, this->last_pos.y, this->last_size.x, this->last_size.y}; + CBox damage_box = {this->last_pos.x, this->last_pos.y, this->last_size.x, this->last_size.y}; g_pHyprRenderer->damageBox(&damage_box); this->bar.damaged = true; @@ -515,7 +516,7 @@ void Hy3TabGroup::tick() { pos.y -= *padding; } - wlr_box damage_box = {pos.x, pos.y, size.x, size.y}; + CBox damage_box = {pos.x, pos.y, size.x, size.y}; g_pHyprRenderer->damageBox(&damage_box); this->bar.damaged = true; @@ -589,8 +590,9 @@ void Hy3TabGroup::renderTabBar() { auto wpos = window->m_vRealPosition.vec() - monitor->vecPosition; auto wsize = window->m_vRealSize.vec(); - wlr_box window_box = {wpos.x, wpos.y, wsize.x, wsize.y}; - scaleBox(&window_box, scale); + CBox window_box = {wpos.x, wpos.y, wsize.x, wsize.y}; + // scaleBox(&window_box, scale); + window_box.scale(scale); if (window_box.width > 0 && window_box.height > 0) g_pHyprOpenGL->renderRect(&window_box, CColor(0, 0, 0, 0), *window_rounding); @@ -616,7 +618,7 @@ void Hy3TabGroup::renderTabBar() { Vector2D entry_size = {((entry.width.fl() * size.x) - *padding) * scale, scaled_size.y}; if (entry_size.x < 0 || entry_size.y < 0 || fade_opacity == 0.0) return; - wlr_box box = { + CBox box = { entry_pos.x, entry_pos.y, entry_size.x, diff --git a/src/TabGroup.hpp b/src/TabGroup.hpp index e0deb48..6cf92c7 100644 --- a/src/TabGroup.hpp +++ b/src/TabGroup.hpp @@ -54,7 +54,7 @@ struct Hy3TabBarEntry { void beginDestroy(); void unDestroy(); bool shouldRemove(); - void prepareTexture(float, wlr_box&); + void prepareTexture(float, CBox&); }; class Hy3TabBar {