2 # vim:ts=4:sw=4:expandtab
4 # Test if new containers get focused when there is a fullscreen container at
5 # the time of launching the new one.
11 use_ok('X11::XCB::Window');
14 my $x = X11::XCB::Connection->new;
15 my $i3 = i3(get_socket_path());
17 my $tmp = fresh_workspace;
19 #####################################################################
20 # open the left window
21 #####################################################################
23 my $left = open_standard_window($x, '#ff0000');
25 is($x->input_focus, $left->id, 'left window focused');
27 diag("left = " . $left->id);
29 #####################################################################
30 # Open the right window
31 #####################################################################
33 my $right = open_standard_window($x, '#00ff00');
35 diag("right = " . $right->id);
37 #####################################################################
38 # Set the right window to fullscreen
39 #####################################################################
40 cmd 'nop setting fullscreen';
43 #####################################################################
45 #####################################################################
47 my $third = open_standard_window($x, '#0000ff');
49 diag("third = " . $third->id);
51 # move the fullscreen window to a different ws
53 my $tmp2 = get_unused_workspace;
55 cmd "move workspace $tmp2";
57 # verify that the third window has the focus
61 is($x->input_focus, $third->id, 'third window focused');