Damage tab bar each tick to avoid defects

This solution is hacky and needs to be improved

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner 2024-06-01 20:02:48 +02:00
parent 3025a015ea
commit 445381f871
No known key found for this signature in database
GPG key ID: BB126BDA1FFBF42B
2 changed files with 9 additions and 0 deletions

View file

@ -271,6 +271,14 @@ void Hy3TabBar::tick() {
}
if (this->entries.empty()) this->destroy = true;
damage();
}
void Hy3TabBar::damage() {
auto pos = this->entries.front().node.position;
auto box = CBox {pos.x, pos.y, this->size.x, this->size.y};
g_pHyprRenderer->damageBox(&box);
}
void Hy3TabBar::updateNodeList(std::list<Hy3Node*>& nodes) {

View file

@ -67,6 +67,7 @@ public:
Hy3TabBar();
void beginDestroy();
void damage();
void tick();
void updateNodeList(std::list<Hy3Node*>& nodes);
void updateAnimations(bool warp = false);