]> git.sur5r.net Git - i3/i3/blob - testcases/t/46-floating-reinsert.t
Merge branch 'master' into next
[i3/i3] / testcases / t / 46-floating-reinsert.t
1 #!perl
2 # vim:ts=4:sw=4:expandtab
3 #
4 use X11::XCB qw(:all);
5 use i3test;
6
7 BEGIN {
8     use_ok('X11::XCB::Window');
9 }
10
11 my $x = X11::XCB::Connection->new;
12
13 my $tmp = fresh_workspace;
14
15 my $left = open_window($x);
16 my $mid = open_window($x);
17
18 cmd 'split v';
19 my $bottom = open_window($x);
20
21 my ($nodes, $focus) = get_ws_content($tmp);
22
23 #############################################################################
24 # 1: open a floating window, get it mapped
25 #############################################################################
26
27 # Create a floating window
28 my $window = open_floating_window($x);
29 ok($window->mapped, 'Window is mapped');
30
31 ($nodes, $focus) = get_ws_content($tmp);
32 is(@{$nodes->[1]->{nodes}}, 2, 'two windows in split con');
33
34 #############################################################################
35 # 2: make it tiling, see where it ends up
36 #############################################################################
37
38 cmd 'floating toggle';
39
40 my ($nodes, $focus) = get_ws_content($tmp);
41
42 is(@{$nodes->[1]->{nodes}}, 3, 'three windows in split con after floating toggle');
43
44 done_testing;