c8ae1d1aa25be2986e7701b5b49a836e4a320a93
- Author
- outfoxxed <outfoxxed@outfoxxed.me>
- Committer
- outfoxxed <outfoxxed@outfoxxed.me>
- Date
Message
Better node focus display in tabs
Active child is always marked focused
All nodes are marked focused if the group is selected
Diff
1diff --git a/src/TabGroup.cpp b/src/TabGroup.cpp
2index 1e2d0e2904a2fc084dc33fd4106f099893a15fed..64a7b63246a1a57f7c2f84e56beb1c31173dc9c1 100644
3--- a/src/TabGroup.cpp
4+++ b/src/TabGroup.cpp
5@@ -191,7 +191,9 @@ void Hy3TabBar::updateNodeList(std::list<Hy3Node*>& nodes) {
6 }
7
8 // set stats from node data
9- entry->setFocused((*node)->isIndirectlyFocused());
10+ auto* parent = (*node)->parent;
11+ auto& parent_group = parent->data.as_group;
12+ entry->setFocused(parent_group.focused_child == *node || (parent_group.group_focused && parent->isIndirectlyFocused()));
13 entry->setUrgent((*node)->isUrgent());
14
15 node = std::next(node);