2 # vim:ts=4:sw=4:expandtab
4 # Please read the following documents before working on tests:
5 # • http://build.i3wm.org/docs/testsuite.html
8 # • http://build.i3wm.org/docs/lib-i3test.html
9 # (alternatively: perldoc ./testcases/lib/i3test.pm)
11 # • http://onyxneon.com/books/modern_perl/modern_perl_a4.pdf
12 # (unless you are already familiar with Perl)
14 use i3test i3_autostart => 0;
16 # Ensure the pointer is at (0, 0) so that we really start on the first
17 # (the left) workspace.
18 $x->root->warp_pointer(0, 0);
22 font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
23 fake-outputs 1024x768+0+0,1024x768+1024+0
26 my $pid = launch_with_config($config);
28 my $i3 = i3(get_socket_path());
30 ######################################################
31 # Open one workspace with one window on both outputs #
32 ######################################################
34 # Open window on workspace 1, left output
35 is(focused_ws, '1', 'starting with focus on workspace 1');
38 # Open window on workspace 2, right output
39 cmd 'focus output right';
40 is(focused_ws, '2', 'moved focus to workspace 2');
43 # If mouse_warping is disabled, the pointer has not moved from
44 # position (0, 0) when focus was switched to workspace 2
45 $x->root->warp_pointer(0, 0);
47 # Ensure focus is still on workspace 2
48 is(focused_ws, '2', 'warped mouse cursor to (0, 0), focus still in workspace 2');
51 exit_gracefully($pid);