]> git.sur5r.net Git - i3/i3/blobdiff - testcases/t/02-fullscreen.t
Implement dock mode, update testsuite
[i3/i3] / testcases / t / 02-fullscreen.t
index e13bff63457c7c2ac44f243b85f27aff03b3a304..27ae8411fa20a0f0be25ffbbf57f95e12f4a6b73 100644 (file)
@@ -18,7 +18,15 @@ sub fullscreen_windows {
 # get the output of this workspace
 my $tree = $i3->get_tree->recv;
 my @outputs = @{$tree->{nodes}};
-my $output = first { defined(first { $_->{name} eq $tmp } @{$_->{nodes}}) } @outputs;
+my $output;
+for my $o (@outputs) {
+    # get the first CT_CON of each output
+    my $content = first { $_->{type} == 2 } @{$o->{nodes}};
+    if (defined(first { $_->{name} eq $tmp } @{$content->{nodes}})) {
+        $output = $o;
+        last;
+    }
+}
 
 BEGIN {
     use_ok('X11::XCB::Window');