From 45a6664d7eaa8c7fbfe2adb67cae1e465afce3ba Mon Sep 17 00:00:00 2001 From: Visti Andresen Date: Mon, 1 Apr 2024 18:18:33 +0200 Subject: [PATCH] Switched to using the new getWorkspaceRulesFor API --- src/Hy3Layout.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/Hy3Layout.cpp b/src/Hy3Layout.cpp index b1f1773..5fc3346 100644 --- a/src/Hy3Layout.cpp +++ b/src/Hy3Layout.cpp @@ -1476,7 +1476,7 @@ void Hy3Layout::applyNodeDataToWindow(Hy3Node* node, bool no_animation) { return; } - const auto workspace_rule = g_pConfigManager->getWorkspaceRuleFor(workspace); + const auto workspace_rules = g_pConfigManager->getWorkspaceRulesFor(workspace); // clang-format off static const auto gaps_in = ConfigValue("general:gaps_in"); @@ -1513,7 +1513,14 @@ void Hy3Layout::applyNodeDataToWindow(Hy3Node* node, bool no_animation) { && g_pCompositor->getWorkspaceByID(window->m_iWorkspaceID)->m_efFullscreenMode == FULLSCREEN_FULL))) { - window->m_sSpecialRenderData.border = workspace_rule.border.value_or(*no_gaps_when_only == 2); + window->m_sSpecialRenderData.border = *no_gaps_when_only == 2; + for (auto& workspace_rule : workspace_rules) { + if (workspace_rule.border.has_value()) { + //Hyprland src/desktop/Window.cpp, line 1107, SHA 5e8c25d498ed5cb7852ae74a876b0c138a62d59d + //does not break the loop, the last value gets to decide + window->m_sSpecialRenderData.border = workspace_rule.border.value(); + } + } window->m_sSpecialRenderData.rounding = false; window->m_sSpecialRenderData.shadow = false;