3c42fae982bb9de0d5a7e6d9aa80942abf2737fb

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

Message

fix: reset node size when inserted into layout

Fixes a bug that caused nodes with a non 1.0 size_ratio to offset
other nodes in a workspace when moved from another workspace.

Diff

 1diff --git a/CHANGELOG.md b/CHANGELOG.md
 2index 24bba979a88c8cb34f8f0b5f3dc1390bd8a694f5..0ee727ca12e4d6b78809292d66e12b5474cc185f 100644
 3--- a/CHANGELOG.md
 4+++ b/CHANGELOG.md
 5@@ -3,6 +3,7 @@
 6 # Upcoming
 7 
 8 - Fixed glitchy tab bar effects when switching workspaces with fade effect.
 9+- Fixed wrongly sized layout when moving resized nodes between workspaces.
10 
11 # hl0.41.0 and before
12 
13diff --git a/src/Hy3Layout.cpp b/src/Hy3Layout.cpp
14index 0bf51150dbf3460b92b1a2cc46b94263fb034f30..b05a5d69601332894a002c213d755a701cc952d6 100644
15--- a/src/Hy3Layout.cpp
16+++ b/src/Hy3Layout.cpp
17@@ -126,6 +126,7 @@ void Hy3Layout::insertNode(Hy3Node& node) {
18 	}
19 
20 	node.reparenting = true;
21+	node.size_ratio = 1.0;
22 
23 	auto* monitor = g_pCompositor->getMonitorFromID(node.workspace->m_iMonitorID);
24