From: Orestis Floros Date: Wed, 12 Sep 2018 11:11:08 +0000 (+0300) Subject: i3-save-tree: Exclude unsupported "transient_for" property X-Git-Tag: 4.16~41^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a66048a95625a10784c3f577258b24e6efdbe2a4;p=i3%2Fi3 i3-save-tree: Exclude unsupported "transient_for" property Even if i3 supported matching windows through "transient_for", it wouldn't be useful for the purpose of i3-save-tree. --- diff --git a/i3-save-tree b/i3-save-tree index 1e56a045..da5e6ded 100755 --- a/i3-save-tree +++ b/i3-save-tree @@ -123,9 +123,7 @@ sub strip_containers { delete $tree->{current_border_width} if $tree->{current_border_width} == -1; for my $key (keys %$tree) { - next if exists($allowed_keys{$key}); - - delete $tree->{$key}; + delete $tree->{$key} unless exists($allowed_keys{$key}); } for my $key (qw(nodes floating_nodes)) { @@ -169,7 +167,8 @@ sub dump_containers { if (leaf_node($tree)) { my $swallows = {}; for my $property (keys %{$tree->{window_properties}}) { - $swallows->{$property} = '^' . quotemeta($tree->{window_properties}->{$property}) . '$'; + $swallows->{$property} = '^' . quotemeta($tree->{window_properties}->{$property}) . '$' + if $property ne 'transient_for'; } $tree->{swallows} = [ $swallows ]; }