a19f3b5e06b1bb66bd78ba0b46210ddadae43a3c

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

Message

fixup: fix compile against hyprland after hyprland#6776

Fixes #133

Diff

  1diff --git a/flake.lock b/flake.lock
  2index f0efe609f1e7602d8e0e0cf7b5c3a94160dd796f..75978289c1dbe1220a9a5a766f670febef321d2b 100644
  3--- a/flake.lock
  4+++ b/flake.lock
  5@@ -40,16 +40,17 @@
  6         "xdph": "xdph"
  7       },
  8       "locked": {
  9-        "lastModified": 1719317162,
 10-        "narHash": "sha256-JmfnYz+9a4TjNl3mAus1VpoWtTI9d1xkW9MHbkcV0Po=",
 11-        "rev": "918d8340afd652b011b937d29d5eea0be08467f5",
 12-        "revCount": 4886,
 13+        "lastModified": 1720896272,
 14+        "narHash": "sha256-zo1lDMsxjEyko/P+KfCLNYZrCAWQOrX90/J31nqzpy4=",
 15+        "ref": "refs/heads/main",
 16+        "rev": "bc6b0880dda2607a80f000c134f573c970452a0f",
 17+        "revCount": 4925,
 18         "submodules": true,
 19         "type": "git",
 20         "url": "https://github.com/hyprwm/Hyprland"
 21       },
 22       "original": {
 23-        "rev": "918d8340afd652b011b937d29d5eea0be08467f5",
 24+        "rev": "bc6b0880dda2607a80f000c134f573c970452a0f",
 25         "submodules": true,
 26         "type": "git",
 27         "url": "https://github.com/hyprwm/Hyprland"
 28diff --git a/flake.nix b/flake.nix
 29index 800f18122b24f48100d8ffae3e4f4ae561647089..bfac52e586eab1fae1ca8c6f5cef66499f50982c 100644
 30--- a/flake.nix
 31+++ b/flake.nix
 32@@ -1,6 +1,6 @@
 33 {
 34   inputs = {
 35-    hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1&rev=918d8340afd652b011b937d29d5eea0be08467f5";
 36+    hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1&rev=bc6b0880dda2607a80f000c134f573c970452a0f";
 37   };
 38 
 39   outputs = { self, hyprland, ... }: let
 40diff --git a/src/Hy3Layout.cpp b/src/Hy3Layout.cpp
 41index a4f075e74249aa4b39dbf8c257d87e3fd4d63e2c..6f65e7393ab2d8d8e381f00b5cdf0990ad7d4f98 100644
 42--- a/src/Hy3Layout.cpp
 43+++ b/src/Hy3Layout.cpp
 44@@ -12,6 +12,7 @@
 45 #include "Hy3Node.hpp"
 46 #include "SelectionHook.hpp"
 47 #include "globals.hpp"
 48+#include "src/desktop/Window.hpp"
 49 
 50 SP<HOOK_CALLBACK_FN> renderHookPtr;
 51 SP<HOOK_CALLBACK_FN> windowTitleHookPtr;
 52@@ -300,9 +301,7 @@ void Hy3Layout::onWindowRemovedTiling(PHLWINDOW window) {
 53 	    (uintptr_t) node->parent
 54 	);
 55 
 56-	window->m_sSpecialRenderData.rounding = true;
 57-	window->m_sSpecialRenderData.border = true;
 58-	window->m_sSpecialRenderData.decorate = true;
 59+	window->unsetWindowData(PRIORITY_LAYOUT);
 60 
 61 	if (window->m_bIsFullscreen) {
 62 		g_pCompositor->setWindowFullscreen(window, false, FULLSCREEN_FULL);
 63@@ -521,9 +520,7 @@ void Hy3Layout::fullscreenRequestForWindow(
 64 			window->m_vRealPosition = window->m_vLastFloatingPosition;
 65 			window->m_vRealSize = window->m_vLastFloatingSize;
 66 
 67-			window->m_sSpecialRenderData.rounding = true;
 68-			window->m_sSpecialRenderData.border = true;
 69-			window->m_sSpecialRenderData.decorate = true;
 70+			window->unsetWindowData(PRIORITY_LAYOUT);
 71 		}
 72 	} else {
 73 		window->m_pWorkspace->m_efFullscreenMode = fullscreen_mode;
 74@@ -638,7 +635,7 @@ PHLWINDOW Hy3Layout::getNextWindowCandidate(PHLWINDOW window) {
 75 		for (auto& w: g_pCompositor->m_vWindows | std::views::reverse) {
 76 			if (w->m_bIsMapped && !w->isHidden() && w->m_bIsFloating && w->m_iX11Type != 2
 77 			    && w->m_pWorkspace == window->m_pWorkspace && !w->m_bX11ShouldntFocus
 78-			    && !w->m_sAdditionalConfigData.noFocus && w != window)
 79+			    && !w->m_sWindowData.noFocus.valueOrDefault() && w != window)
 80 			{
 81 				return w;
 82 			}
 83@@ -1529,8 +1526,6 @@ void Hy3Layout::applyNodeDataToWindow(Hy3Node* node, bool no_animation) {
 84 		return;
 85 	}
 86 
 87-	const auto workspace_rule = g_pConfigManager->getWorkspaceRuleFor(node->workspace);
 88-
 89 	// clang-format off
 90 	static const auto gaps_in = ConfigValue<Hyprlang::CUSTOMTYPE, CCssGapData>("general:gaps_in");
 91 	static const auto no_gaps_when_only = ConfigValue<Hyprlang::INT>("plugin:hy3:no_gaps_when_only");
 92@@ -1549,7 +1544,7 @@ void Hy3Layout::applyNodeDataToWindow(Hy3Node* node, bool no_animation) {
 93 		return;
 94 	}
 95 
 96-	window->updateSpecialRenderData();
 97+	window->unsetWindowData(PRIORITY_LAYOUT);
 98 
 99 	auto nodeBox = CBox(node->position, node->size);
100 	nodeBox.round();
101@@ -1565,10 +1560,10 @@ void Hy3Layout::applyNodeDataToWindow(Hy3Node* node, bool no_animation) {
102 	        || (window->m_bIsFullscreen && window->m_pWorkspace->m_efFullscreenMode == FULLSCREEN_FULL
103 	        )))
104 	{
105-		window->m_sSpecialRenderData.border = workspace_rule.border.value_or(*no_gaps_when_only == 2);
106-
107-		window->m_sSpecialRenderData.rounding = false;
108-		window->m_sSpecialRenderData.shadow = false;
109+		window->m_sWindowData.decorate = CWindowOverridableVar(true, PRIORITY_LAYOUT); // a little curious but copying what dwindle does
110+		window->m_sWindowData.noBorder = CWindowOverridableVar(*no_gaps_when_only != 2, PRIORITY_LAYOUT);
111+		window->m_sWindowData.noRounding = CWindowOverridableVar(true, PRIORITY_LAYOUT);
112+		window->m_sWindowData.noShadow = CWindowOverridableVar(true, PRIORITY_LAYOUT);
113 
114 		window->updateWindowDecos();
115