From 6d022e6dc937123243727637b36b48dcaf129099 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Wed, 5 Aug 2015 22:43:18 +0200 Subject: [PATCH] =?utf8?q?i3-save-tree:=20retain=20=E2=80=9Crect=E2=80=9D?= =?utf8?q?=20for=20floating=5Fcons?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- i3-save-tree | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/i3-save-tree b/i3-save-tree index 18a1a380..b00e1fe1 100755 --- a/i3-save-tree +++ b/i3-save-tree @@ -99,6 +99,7 @@ my %allowed_keys = map { ($_, 1) } qw( geometry window_properties mark + rect ); sub strip_containers { @@ -116,6 +117,9 @@ sub strip_containers { delete $tree->{geometry} if zero_rect($tree->{geometry}); + # Retain the rect for floating containers to keep their positions. + delete $tree->{rect} unless $tree->{type} eq 'floating_con'; + delete $tree->{current_border_width} if $tree->{current_border_width} == -1; for my $key (keys %$tree) { -- 2.39.5