052570265c6c6f5e044bae933790e369741ea489

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

Message

fix tabs rendering with default transform on rotated monitors

Diff

 1diff --git a/src/render.cpp b/src/render.cpp
 2index 4de21fa12c91239313f4cf855bb96a83aed6a6f3..74c5ddf8996bfd013286e4131579fd68dffd1900 100644
 3--- a/src/render.cpp
 4+++ b/src/render.cpp
 5@@ -4,11 +4,13 @@
 6 #include <hyprland/src/helpers/math/Math.hpp>
 7 #include <hyprland/src/render/OpenGL.hpp>
 8 #include <hyprutils/math/Box.hpp>
 9+#include <hyprutils/math/Misc.hpp>
10 #include <hyprutils/math/Vector2D.hpp>
11 
12 #include "shaders.hpp"
13 
14 using Hyprutils::Math::CBox;
15+using Hyprutils::Math::HYPRUTILS_TRANSFORM_NORMAL;
16 
17 void Hy3Render::renderTab(
18     const CBox& box,
19@@ -28,11 +30,8 @@ void Hy3Render::renderTab(
20 	const auto& monitorSize = rdata.pMonitor->vecTransformedSize;
21 	auto monitorBox = CBox {Vector2D(), monitorSize};
22 
23-	auto matrix = rdata.monitorProjection.projectBox(
24-	    monitorBox,
25-	    wlTransformToHyprutils(invertTransform(rdata.pMonitor->transform)),
26-	    monitorBox.rot
27-	);
28+	auto matrix =
29+			rdata.monitorProjection.projectBox(monitorBox, HYPRUTILS_TRANSFORM_NORMAL, monitorBox.rot);
30 
31 	auto glMatrix = rdata.projection.copy().multiply(matrix);
32