]> git.sur5r.net Git - i3/i3/blob - testcases/t/127-regress-floating-parent.t
Merge branch 'fix-scratchpad-focus'
[i3/i3] / testcases / t / 127-regress-floating-parent.t
1 #!perl
2 # vim:ts=4:sw=4:expandtab
3 #
4 # Regression: make a container floating, kill its parent, make it tiling again
5 #
6 use i3test;
7
8 my $tmp = fresh_workspace;
9
10 cmd 'open';
11 my $left = get_focused($tmp);
12 cmd 'open';
13 my $old = get_focused($tmp);
14 cmd 'split v';
15 cmd 'open';
16 my $floating = get_focused($tmp);
17 diag("focused floating: " . get_focused($tmp));
18 cmd 'mode toggle';
19 sync_with_i3;
20
21 # kill old container
22 cmd qq|[con_id="$old"] focus|;
23 is(get_focused($tmp), $old, 'old container focused');
24 cmd 'kill';
25
26 # kill left container
27 cmd qq|[con_id="$left"] focus|;
28 is(get_focused($tmp), $left, 'old container focused');
29 cmd 'kill';
30
31 # focus floating window, make it tiling again
32 cmd qq|[con_id="$floating"] focus|;
33 is(get_focused($tmp), $floating, 'floating window focused');
34
35 sync_with_i3;
36 cmd 'mode toggle';
37
38 does_i3_live;
39
40 done_testing;