2 # vim:ts=4:sw=4:expandtab
3 # Regression: Check if the focus stays the same when switching the layout
4 # bug introduced by 77d0d42ed2d7ac8cafe267c92b35a81c1b9491eb
7 my $i3 = i3(get_socket_path());
12 my @ws = @{$i3->get_workspaces->recv};
13 my @nums = map { $_->{num} } grep { defined($_->{num}) } @ws;
14 my @sorted = sort @nums;
16 cmp_deeply(\@nums, \@sorted, $msg);
19 my $tmp = fresh_workspace;
21 my $left = open_window;
22 my $mid = open_window;
23 my $right = open_window;
27 diag("left = " . $left->id . ", mid = " . $mid->id . ", right = " . $right->id);
29 is($x->input_focus, $right->id, 'Right window focused');
33 is($x->input_focus, $mid->id, 'Mid window focused');
37 is($x->input_focus, $mid->id, 'Mid window focused');