diff --git a/flake.lock b/flake.lock index f0efe60..7597828 100644 --- a/flake.lock +++ b/flake.lock @@ -40,16 +40,17 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1719317162, - "narHash": "sha256-JmfnYz+9a4TjNl3mAus1VpoWtTI9d1xkW9MHbkcV0Po=", - "rev": "918d8340afd652b011b937d29d5eea0be08467f5", - "revCount": 4886, + "lastModified": 1720896272, + "narHash": "sha256-zo1lDMsxjEyko/P+KfCLNYZrCAWQOrX90/J31nqzpy4=", + "ref": "refs/heads/main", + "rev": "bc6b0880dda2607a80f000c134f573c970452a0f", + "revCount": 4925, "submodules": true, "type": "git", "url": "https://github.com/hyprwm/Hyprland" }, "original": { - "rev": "918d8340afd652b011b937d29d5eea0be08467f5", + "rev": "bc6b0880dda2607a80f000c134f573c970452a0f", "submodules": true, "type": "git", "url": "https://github.com/hyprwm/Hyprland" diff --git a/flake.nix b/flake.nix index 800f181..bfac52e 100644 --- a/flake.nix +++ b/flake.nix @@ -1,6 +1,6 @@ { inputs = { - hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1&rev=918d8340afd652b011b937d29d5eea0be08467f5"; + hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1&rev=bc6b0880dda2607a80f000c134f573c970452a0f"; }; outputs = { self, hyprland, ... }: let diff --git a/src/Hy3Layout.cpp b/src/Hy3Layout.cpp index a4f075e..6f65e73 100644 --- a/src/Hy3Layout.cpp +++ b/src/Hy3Layout.cpp @@ -12,6 +12,7 @@ #include "Hy3Node.hpp" #include "SelectionHook.hpp" #include "globals.hpp" +#include "src/desktop/Window.hpp" SP renderHookPtr; SP windowTitleHookPtr; @@ -300,9 +301,7 @@ void Hy3Layout::onWindowRemovedTiling(PHLWINDOW window) { (uintptr_t) node->parent ); - window->m_sSpecialRenderData.rounding = true; - window->m_sSpecialRenderData.border = true; - window->m_sSpecialRenderData.decorate = true; + window->unsetWindowData(PRIORITY_LAYOUT); if (window->m_bIsFullscreen) { g_pCompositor->setWindowFullscreen(window, false, FULLSCREEN_FULL); @@ -521,9 +520,7 @@ void Hy3Layout::fullscreenRequestForWindow( window->m_vRealPosition = window->m_vLastFloatingPosition; window->m_vRealSize = window->m_vLastFloatingSize; - window->m_sSpecialRenderData.rounding = true; - window->m_sSpecialRenderData.border = true; - window->m_sSpecialRenderData.decorate = true; + window->unsetWindowData(PRIORITY_LAYOUT); } } else { window->m_pWorkspace->m_efFullscreenMode = fullscreen_mode; @@ -638,7 +635,7 @@ PHLWINDOW Hy3Layout::getNextWindowCandidate(PHLWINDOW window) { for (auto& w: g_pCompositor->m_vWindows | std::views::reverse) { if (w->m_bIsMapped && !w->isHidden() && w->m_bIsFloating && w->m_iX11Type != 2 && w->m_pWorkspace == window->m_pWorkspace && !w->m_bX11ShouldntFocus - && !w->m_sAdditionalConfigData.noFocus && w != window) + && !w->m_sWindowData.noFocus.valueOrDefault() && w != window) { return w; } @@ -1529,8 +1526,6 @@ void Hy3Layout::applyNodeDataToWindow(Hy3Node* node, bool no_animation) { return; } - const auto workspace_rule = g_pConfigManager->getWorkspaceRuleFor(node->workspace); - // clang-format off static const auto gaps_in = ConfigValue("general:gaps_in"); static const auto no_gaps_when_only = ConfigValue("plugin:hy3:no_gaps_when_only"); @@ -1549,7 +1544,7 @@ void Hy3Layout::applyNodeDataToWindow(Hy3Node* node, bool no_animation) { return; } - window->updateSpecialRenderData(); + window->unsetWindowData(PRIORITY_LAYOUT); auto nodeBox = CBox(node->position, node->size); nodeBox.round(); @@ -1565,10 +1560,10 @@ void Hy3Layout::applyNodeDataToWindow(Hy3Node* node, bool no_animation) { || (window->m_bIsFullscreen && window->m_pWorkspace->m_efFullscreenMode == FULLSCREEN_FULL ))) { - window->m_sSpecialRenderData.border = workspace_rule.border.value_or(*no_gaps_when_only == 2); - - window->m_sSpecialRenderData.rounding = false; - window->m_sSpecialRenderData.shadow = false; + window->m_sWindowData.decorate = CWindowOverridableVar(true, PRIORITY_LAYOUT); // a little curious but copying what dwindle does + window->m_sWindowData.noBorder = CWindowOverridableVar(*no_gaps_when_only != 2, PRIORITY_LAYOUT); + window->m_sWindowData.noRounding = CWindowOverridableVar(true, PRIORITY_LAYOUT); + window->m_sWindowData.noShadow = CWindowOverridableVar(true, PRIORITY_LAYOUT); window->updateWindowDecos();