]> git.sur5r.net Git - i3/i3/commitdiff
i3-save-tree: retain “rect” for floating_cons
authorMichael Stapelberg <michael@stapelberg.de>
Wed, 5 Aug 2015 20:43:18 +0000 (22:43 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Wed, 5 Aug 2015 20:43:18 +0000 (22:43 +0200)
i3-save-tree

index 18a1a38068b7da28b9b4efd69c92da4bbb6e4a72..b00e1fe18330926dc638dcc879156e0eabe6eaf3 100755 (executable)
@@ -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) {