102e652fe926d1da2a18d22928a69760580d7751

Author
outfoxxed <outfoxxed@outfoxxed.me>
Committer
outfoxxed <outfoxxed@outfoxxed.me>
Date

Message

Fix tab bars not rendering on non 1.0 dpi values

Closes #48

Diff

 1diff --git a/src/TabGroup.cpp b/src/TabGroup.cpp
 2index 28ced1d4fad3599a4f00016b6d5346a62506a90b..862211339ba2457dca70736da4673561fd909703 100644
 3--- a/src/TabGroup.cpp
 4+++ b/src/TabGroup.cpp
 5@@ -548,8 +548,9 @@ void Hy3TabGroup::renderTabBar() {
 6 	auto scaled_size = Vector2D(std::round(size.x * scale), std::round(size.y * scale));
 7 	wlr_box box = {scaled_pos.x, scaled_pos.y, scaled_size.x, scaled_size.y};
 8 
 9-	if (scaled_pos.x > monitor_size.x || scaled_pos.y > monitor_size.y
10-	    || scaled_pos.x + scaled_size.x < 0 || scaled_pos.y + scaled_size.y < 0)
11+	// monitor size is not scaled
12+	if (pos.x > monitor_size.x || pos.y > monitor_size.y || scaled_pos.x + scaled_size.x < 0
13+	    || scaled_pos.y + scaled_size.y < 0)
14 		return;
15 
16 	if (!this->bar.damaged) {