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.
This commit is contained in:
Orestis Floros 2018-09-12 14:11:08 +03:00
parent 484854d52f
commit a66048a956
No known key found for this signature in database
GPG Key ID: E9AD9F32E401E38F
1 changed files with 3 additions and 4 deletions

View File

@ -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 ];
}