@content = @{get_ws_content($tmp)};
cmp_ok(@content, '==', 0, 'no more nodes');
+kill_all_windows;
+
##############################################################
# 2: match on the title, check if for_window is really executed
# only once
@content = @{get_ws_content($tmp)};
cmp_ok(@content, '==', 0, 'no more nodes');
+kill_all_windows;
+
##############################################################
# 3: match on the title, set border style *and* a mark
##############################################################
@content = @{get_ws_content($tmp)};
ok($content[0]->{focused}, 'first node focused');
+kill_all_windows;
+
##############################################################
# 4: multiple criteria for the for_window command
##############################################################
cmp_ok(@content, '==', 1, 'one node on this workspace now');
is($content[0]->{border}, 'normal', 'no border');
+kill_all_windows;
+
##############################################################
# 5: check that a class criterion does not match the instance
##############################################################
cmp_ok(@content, '==', 1, 'one node on this workspace now');
is($content[0]->{border}, 'normal', 'normal border, not matched');
+kill_all_windows;
+
##############################################################
# 6: check that the 'instance' criterion works
##############################################################
cmp_ok(@content, '==', 1, 'one node on this workspace now');
is($content[0]->{border}, 'none', 'no border');
+kill_all_windows;
+
##############################################################
# 7: check that invalid criteria don’t end up matching all windows
##############################################################
cmp_ok(@content, '==', 1, 'one node on this workspace now');
is($content[0]->{border}, 'normal', 'normal border');
+kill_all_windows;
+
##############################################################
# 8: check that the role criterion works properly
##############################################################
cmp_ok(@content, '==', 1, 'one node on this workspace now');
is($content[0]->{border}, 'none', 'no border (window_role)');
+kill_all_windows;
+
##############################################################
# 9: another test for the window_role, but this time it changes
# *after* the window has been mapped
cmp_ok(@content, '==', 1, 'one node on this workspace now');
is($content[0]->{border}, 'none', 'no border (window_role 2)');
+kill_all_windows;
+
##############################################################
# 10: check that the criterion 'window_type' works
##############################################################
my @nodes = @{get_ws($tmp)->{floating_nodes}};
cmp_ok(@nodes, '==', 1, 'one floating container on this workspace');
is_deeply($nodes[0]->{nodes}[0]->{marks}, [ "branded-$window_type" ], "mark set (window_type = $atom)");
+
+ kill_all_windows;
}
##############################################################
my @nodes = @{get_ws($tmp)->{floating_nodes}};
cmp_ok(@nodes, '==', 1, 'one floating container on this workspace');
is_deeply($nodes[0]->{nodes}[0]->{marks}, [ "branded-$window_type" ], "mark set (window_type = $atom)");
+
+ kill_all_windows;
}
##############################################################
cmp_ok(@nodes, '==', 1, 'one floating container on this workspace');
is_deeply($nodes[0]->{nodes}[0]->{marks}, [ 'triggered' ], "mark set for workspace criterion");
+kill_all_windows;
+
##############################################################
exit_gracefully($pid);