From: Michael Stapelberg Date: Wed, 5 Aug 2015 20:43:18 +0000 (+0200) Subject: i3-save-tree: retain “rect” for floating_cons X-Git-Tag: 4.11~55 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6d022e6dc937123243727637b36b48dcaf129099;p=i3%2Fi3 i3-save-tree: retain “rect” for floating_cons --- 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) {