X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=i3-save-tree;h=b00e1fe18330926dc638dcc879156e0eabe6eaf3;hb=35b05ccd2f740d8e6e21ef8b87a2d837a87003e2;hp=289fd8c6980d4e8aa25cc64d9390947459846ee3;hpb=8629c2e208930414f542435509594df051be2009;p=i3%2Fi3 diff --git a/i3-save-tree b/i3-save-tree index 289fd8c6..b00e1fe1 100755 --- a/i3-save-tree +++ b/i3-save-tree @@ -1,7 +1,7 @@ #!/usr/bin/env perl # vim:ts=4:sw=4:expandtab # -# © 2013-2014 Michael Stapelberg +# © 2013 Michael Stapelberg # # Requires perl ≥ v5.10, AnyEvent::I3 and JSON::XS @@ -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) {