]> git.sur5r.net Git - i3/i3/blob - testcases/t/05-ipc.t
Merge branch 'tree' into next
[i3/i3] / testcases / t / 05-ipc.t
1 #!perl
2 # vim:ts=4:sw=4:expandtab
3
4 use i3test;
5 use X11::XCB qw(:all);
6
7 BEGIN {
8     use_ok('X11::XCB::Connection') or BAIL_OUT('Cannot load X11::XCB::Connection');
9 }
10
11 my $x = X11::XCB::Connection->new;
12
13 fresh_workspace;
14
15 #####################################################################
16 # Ensure IPC works by switching workspaces
17 #####################################################################
18
19 # Create a window so we can get a focus different from NULL
20 my $window = open_standard_window($x);
21 diag("window->id = " . $window->id);
22
23 sleep 0.25;
24
25 my $focus = $x->input_focus;
26 diag("old focus = $focus");
27
28 # Switch to another workspace
29 fresh_workspace;
30
31 my $new_focus = $x->input_focus;
32 isnt($focus, $new_focus, "Focus changed");
33
34 done_testing;