45a6664d7eaa8c7fbfe2adb67cae1e465afce3ba

Author
Visti Andresen <talpa@talpa.dk>
Committer
Visti Andresen <talpa@talpa.dk>
Date

Message

Switched to using the new getWorkspaceRulesFor API

Diff

 1diff --git a/src/Hy3Layout.cpp b/src/Hy3Layout.cpp
 2index b1f177305a2f2aa92294b1dea360456732f4bb3d..5fc334670402ca73e3127cb95253d424964437ef 100644
 3--- a/src/Hy3Layout.cpp
 4+++ b/src/Hy3Layout.cpp
 5@@ -1476,7 +1476,7 @@ void Hy3Layout::applyNodeDataToWindow(Hy3Node* node, bool no_animation) {
 6 		return;
 7 	}
 8 
 9-	const auto workspace_rule = g_pConfigManager->getWorkspaceRuleFor(workspace);
10+	const auto workspace_rules = g_pConfigManager->getWorkspaceRulesFor(workspace);
11 
12 	// clang-format off
13 	static const auto gaps_in = ConfigValue<Hyprlang::CUSTOMTYPE, CCssGapData>("general:gaps_in");
14@@ -1513,7 +1513,14 @@ void Hy3Layout::applyNodeDataToWindow(Hy3Node* node, bool no_animation) {
15 	            && g_pCompositor->getWorkspaceByID(window->m_iWorkspaceID)->m_efFullscreenMode
16 	                   == FULLSCREEN_FULL)))
17 	{
18-		window->m_sSpecialRenderData.border = workspace_rule.border.value_or(*no_gaps_when_only == 2);
19+		window->m_sSpecialRenderData.border = *no_gaps_when_only == 2;
20+		for (auto& workspace_rule : workspace_rules) {
21+			if (workspace_rule.border.has_value()) {
22+				//Hyprland src/desktop/Window.cpp, line 1107, SHA 5e8c25d498ed5cb7852ae74a876b0c138a62d59d
23+				//does not break the loop, the last value gets to decide
24+				window->m_sSpecialRenderData.border = workspace_rule.border.value();
25+			}
26+		}
27 		window->m_sSpecialRenderData.rounding = false;
28 		window->m_sSpecialRenderData.shadow = false;
29