From 3c42fae982bb9de0d5a7e6d9aa80942abf2737fb Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Thu, 20 Jun 2024 01:51:54 -0700 Subject: [PATCH] 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. --- CHANGELOG.md | 1 + src/Hy3Layout.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 24bba97..0ee727c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ # Upcoming - 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 diff --git a/src/Hy3Layout.cpp b/src/Hy3Layout.cpp index 0bf5115..b05a5d6 100644 --- a/src/Hy3Layout.cpp +++ b/src/Hy3Layout.cpp @@ -126,6 +126,7 @@ void Hy3Layout::insertNode(Hy3Node& node) { } node.reparenting = true; + node.size_ratio = 1.0; auto* monitor = g_pCompositor->getMonitorFromID(node.workspace->m_iMonitorID);