X-Git-Url: https://git.sur5r.net/?p=i3%2Fi3;a=blobdiff_plain;f=i3-save-tree;fp=i3-save-tree;h=b00e1fe18330926dc638dcc879156e0eabe6eaf3;hp=18a1a38068b7da28b9b4efd69c92da4bbb6e4a72;hb=6d022e6dc937123243727637b36b48dcaf129099;hpb=57438d270de49a97f1bb55e6730da2ff8621c6ce 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) {