]> git.sur5r.net Git - i3/i3/blob - testcases/t/148-regress-floatingmovews.t
tests: rename files (00x-*.t is basic stuff, >=100-*.t are tests using IPC)
[i3/i3] / testcases / t / 148-regress-floatingmovews.t
1 #!perl
2 # vim:ts=4:sw=4:expandtab
3 #
4 # Regression test for correct focus behaviour when moving a floating con to
5 # another workspace.
6 #
7 use X11::XCB qw(:all);
8 use i3test;
9
10 BEGIN {
11     use_ok('X11::XCB::Window');
12 }
13
14 my $x = X11::XCB::Connection->new;
15
16 my $tmp = fresh_workspace;
17
18 # open a tiling window on the first workspace
19 open_window($x);
20 #sleep 0.25;
21 my $first = get_focused($tmp);
22
23 # on a different ws, open a floating window
24 my $otmp = fresh_workspace;
25 open_window($x);
26 #sleep 0.25;
27 my $float = get_focused($otmp);
28 cmd 'mode toggle';
29 #sleep 0.25;
30
31 # move the floating con to first workspace
32 cmd "move workspace $tmp";
33 #sleep 0.25;
34
35 # switch to the first ws and check focus
36 is(get_focused($tmp), $float, 'floating client correctly focused');
37
38 done_testing;