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.
This commit is contained in:
outfoxxed 2024-06-20 01:51:54 -07:00
parent 1fd12b2688
commit 3c42fae982
No known key found for this signature in database
GPG key ID: 4C88A185FB89301E
2 changed files with 2 additions and 0 deletions

View file

@ -3,6 +3,7 @@
# Upcoming # Upcoming
- Fixed glitchy tab bar effects when switching workspaces with fade effect. - Fixed glitchy tab bar effects when switching workspaces with fade effect.
- Fixed wrongly sized layout when moving resized nodes between workspaces.
# hl0.41.0 and before # hl0.41.0 and before

View file

@ -126,6 +126,7 @@ void Hy3Layout::insertNode(Hy3Node& node) {
} }
node.reparenting = true; node.reparenting = true;
node.size_ratio = 1.0;
auto* monitor = g_pCompositor->getMonitorFromID(node.workspace->m_iMonitorID); auto* monitor = g_pCompositor->getMonitorFromID(node.workspace->m_iMonitorID);