a51839bf635d8a8d83629ee56d777a74c48c0da3
- Author
- outfoxxed <outfoxxed@outfoxxed.me>
- Committer
- outfoxxed <outfoxxed@outfoxxed.me>
- Date
Message
don't offset tab bar by gaps_out twice in findTabBarAt
Fixes tab bars being clickable inside of the window bounds.
Diff
1diff --git a/src/Hy3Layout.cpp b/src/Hy3Layout.cpp
2index 6698addc819a1835e7e480a16809c368dc1e3ae7..70d3dd2e90bd9d7d07065731a1bd092315d312c9 100644
3--- a/src/Hy3Layout.cpp
4+++ b/src/Hy3Layout.cpp
5@@ -1171,22 +1171,14 @@ bottom:
6 Hy3Node* findTabBarAt(Hy3Node& node, Vector2D pos, Hy3Node** focused_node) {
7 // clang-format off
8 static const auto p_gaps_in = ConfigValue<Hyprlang::CUSTOMTYPE, CCssGapData>("general:gaps_in");
9- static const auto p_gaps_out = ConfigValue<Hyprlang::CUSTOMTYPE, CCssGapData>("general:gaps_out");
10 static const auto tab_bar_height = ConfigValue<Hyprlang::INT>("plugin:hy3:tabs:height");
11 static const auto tab_bar_padding = ConfigValue<Hyprlang::INT>("plugin:hy3:tabs:padding");
12 // clang-format on
13
14 auto workspace_rule = g_pConfigManager->getWorkspaceRuleFor(node.workspace);
15 auto gaps_in = workspace_rule.gapsIn.value_or(*p_gaps_in);
16- auto gaps_out = workspace_rule.gapsOut.value_or(*p_gaps_out);
17
18- auto inset = *tab_bar_height + *tab_bar_padding;
19-
20- if (node.parent == nullptr) {
21- inset += gaps_out.left;
22- } else {
23- inset += gaps_in.left;
24- }
25+ auto inset = *tab_bar_height + *tab_bar_padding + gaps_in.top;
26
27 if (node.data.is_group()) {
28 if (node.hidden) return nullptr;