]> git.sur5r.net Git - i3/i3/blobdiff - i3-save-tree
Properly initialize sigaction struct
[i3/i3] / i3-save-tree
index 289fd8c6980d4e8aa25cc64d9390947459846ee3..1e56a0452128ffbfd172c636426827ab9d728611 100755 (executable)
@@ -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
 
@@ -98,7 +98,8 @@ my %allowed_keys = map { ($_, 1) } qw(
     name
     geometry
     window_properties
-    mark
+    marks
+    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) {