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.
8 use Time::HiRes qw(sleep);
12 use_ok('X11::XCB::Window');
15 my $x = X11::XCB::Connection->new;
16 my $i3 = i3("/tmp/nestedcons");
18 my $tmp = get_unused_workspace;
21 #####################################################################
22 # open the left window
23 #####################################################################
25 my $left = open_standard_window($x, '#ff0000');
27 is($x->input_focus, $left->id, 'left window focused');
29 diag("left = " . $left->id);
31 #####################################################################
32 # Open the right window
33 #####################################################################
35 my $right = open_standard_window($x, '#00ff00');
37 diag("right = " . $right->id);
39 #####################################################################
40 # Set the right window to fullscreen
41 #####################################################################
42 cmd 'nop setting fullscreen';
45 #####################################################################
47 #####################################################################
49 my $third = open_standard_window($x, '#0000ff');
51 diag("third = " . $third->id);
53 # move the fullscreen window to a different ws
55 my $tmp2 = get_unused_workspace;
57 cmd "move workspace $tmp2";
59 # verify that the third window has the focus
63 is($x->input_focus, $third->id, 'third window focused');