]> git.sur5r.net Git - i3/i3/blob - testcases/t/148-regress-floatingmovews.t
248a8ffad9f4a533bb5c3c883a31c1cf19cb74d3
[i3/i3] / testcases / t / 148-regress-floatingmovews.t
1 #!perl
2 # vim:ts=4:sw=4:expandtab
3 #
4 # Please read the following documents before working on tests:
5 # • http://build.i3wm.org/docs/testsuite.html
6 #   (or docs/testsuite)
7 #
8 # • http://build.i3wm.org/docs/lib-i3test.html
9 #   (alternatively: perldoc ./testcases/lib/i3test.pm)
10 #
11 # • http://build.i3wm.org/docs/ipc.html
12 #   (or docs/ipc)
13 #
14 # • http://onyxneon.com/books/modern_perl/modern_perl_a4.pdf
15 #   (unless you are already familiar with Perl)
16 #
17 # Regression test for correct focus behaviour when moving a floating con to
18 # another workspace.
19 #
20 use i3test;
21
22 my $tmp = fresh_workspace;
23
24 # open a tiling window on the first workspace
25 open_window;
26 my $first = get_focused($tmp);
27
28 # on a different ws, open a floating window
29 my $otmp = fresh_workspace;
30 open_window;
31 my $float = get_focused($otmp);
32 cmd 'mode toggle';
33 sync_with_i3;
34
35 # move the floating con to first workspace
36 cmd "move workspace $tmp";
37 sync_with_i3;
38
39 # switch to the first ws and check focus
40 is(get_focused($tmp), $float, 'floating client correctly focused');
41
42 done_testing;