2 # vim:ts=4:sw=4:expandtab
6 use Time::HiRes qw(sleep);
9 use_ok('X11::XCB::Connection') or BAIL_OUT('Cannot load X11::XCB::Connection');
12 my $x = X11::XCB::Connection->new;
16 #####################################################################
17 # Ensure IPC works by switching workspaces
18 #####################################################################
20 # Switch to the first workspace to get a clean testing environment
21 $i3->command('1')->recv;
23 # Create a window so we can get a focus different from NULL
24 my $window = i3test::open_standard_window($x);
25 diag("window->id = " . $window->id);
29 my $focus = $x->input_focus;
30 diag("old focus = $focus");
32 # Switch to the nineth workspace
33 $i3->command('9')->recv;
35 my $new_focus = $x->input_focus;
36 isnt($focus, $new_focus, "Focus changed");
38 diag( "Testing i3, Perl $], $^X" );