445381f87177b90404d597e617915c8bad3c02b0
- Author
- Šimon Brandner <simon.bra.ag@gmail.com>
- Committer
- Šimon Brandner <simon.bra.ag@gmail.com>
- Date
Message
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>
Diff
1diff --git a/src/TabGroup.cpp b/src/TabGroup.cpp
2index 86eb6791cd6115869b0705bcd27c2c23cf3c8f65..5da614f798528714adbddb4b72507168eda0e988 100644
3--- a/src/TabGroup.cpp
4+++ b/src/TabGroup.cpp
5@@ -271,6 +271,14 @@ void Hy3TabBar::tick() {
6 }
7
8 if (this->entries.empty()) this->destroy = true;
9+
10+ damage();
11+}
12+
13+void Hy3TabBar::damage() {
14+ auto pos = this->entries.front().node.position;
15+ auto box = CBox {pos.x, pos.y, this->size.x, this->size.y};
16+ g_pHyprRenderer->damageBox(&box);
17 }
18
19 void Hy3TabBar::updateNodeList(std::list<Hy3Node*>& nodes) {
20diff --git a/src/TabGroup.hpp b/src/TabGroup.hpp
21index 12117f35f90aa2c45e288cb6b94159abe39f908d..5640958078c8828e9b29eb6451cca1d7a812da14 100644
22--- a/src/TabGroup.hpp
23+++ b/src/TabGroup.hpp
24@@ -67,6 +67,7 @@ public:
25 Hy3TabBar();
26 void beginDestroy();
27
28+ void damage();
29 void tick();
30 void updateNodeList(std::list<Hy3Node*>& nodes);
31 void updateAnimations(bool warp = false);