2011-01-27 11:23:29 -05:00
|
|
|
#!perl
|
|
|
|
# vim:ts=4:sw=4:expandtab
|
|
|
|
#
|
2011-03-09 14:25:17 -05:00
|
|
|
use i3test;
|
2011-01-27 11:23:29 -05:00
|
|
|
|
2011-03-09 14:25:17 -05:00
|
|
|
my $tmp = fresh_workspace;
|
2011-01-27 11:23:29 -05:00
|
|
|
|
2011-09-24 10:11:37 -04:00
|
|
|
my $left = open_window($x);
|
|
|
|
my $mid = open_window($x);
|
2011-01-27 11:23:29 -05:00
|
|
|
|
|
|
|
cmd 'split v';
|
2011-09-24 10:11:37 -04:00
|
|
|
my $bottom = open_window($x);
|
2011-01-27 11:23:29 -05:00
|
|
|
|
|
|
|
my ($nodes, $focus) = get_ws_content($tmp);
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
# 1: open a floating window, get it mapped
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
# Create a floating window
|
2011-09-24 10:11:37 -04:00
|
|
|
my $window = open_floating_window($x);
|
2011-01-27 11:23:29 -05:00
|
|
|
ok($window->mapped, 'Window is mapped');
|
|
|
|
|
|
|
|
($nodes, $focus) = get_ws_content($tmp);
|
|
|
|
is(@{$nodes->[1]->{nodes}}, 2, 'two windows in split con');
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
# 2: make it tiling, see where it ends up
|
|
|
|
#############################################################################
|
|
|
|
|
2011-06-09 20:06:47 -04:00
|
|
|
cmd 'floating toggle';
|
2011-01-27 11:23:29 -05:00
|
|
|
|
2011-11-21 15:04:00 -05:00
|
|
|
($nodes, $focus) = get_ws_content($tmp);
|
2011-01-27 11:23:29 -05:00
|
|
|
|
2011-06-09 20:06:47 -04:00
|
|
|
is(@{$nodes->[1]->{nodes}}, 3, 'three windows in split con after floating toggle');
|
2011-03-09 14:25:17 -05:00
|
|
|
|
|
|
|
done_testing;
|