2011-01-27 17:23:29 +01:00
|
|
|
#!perl
|
|
|
|
# vim:ts=4:sw=4:expandtab
|
|
|
|
#
|
2011-03-09 20:25:17 +01:00
|
|
|
use i3test;
|
2011-01-27 17:23:29 +01:00
|
|
|
|
2011-03-09 20:25:17 +01:00
|
|
|
my $tmp = fresh_workspace;
|
2011-01-27 17:23:29 +01:00
|
|
|
|
2011-11-22 00:47:32 +01:00
|
|
|
my $left = open_window;
|
|
|
|
my $mid = open_window;
|
2011-01-27 17:23:29 +01:00
|
|
|
|
|
|
|
cmd 'split v';
|
2011-11-22 00:47:32 +01:00
|
|
|
my $bottom = open_window;
|
2011-01-27 17:23:29 +01:00
|
|
|
|
|
|
|
my ($nodes, $focus) = get_ws_content($tmp);
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
# 1: open a floating window, get it mapped
|
|
|
|
#############################################################################
|
|
|
|
|
|
|
|
# Create a floating window
|
2011-11-22 01:00:54 +01:00
|
|
|
my $window = open_floating_window;
|
2011-01-27 17:23:29 +01: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-10 02:06:47 +02:00
|
|
|
cmd 'floating toggle';
|
2011-01-27 17:23:29 +01:00
|
|
|
|
2011-11-21 21:04:00 +01:00
|
|
|
($nodes, $focus) = get_ws_content($tmp);
|
2011-01-27 17:23:29 +01:00
|
|
|
|
2011-06-10 02:06:47 +02:00
|
|
|
is(@{$nodes->[1]->{nodes}}, 3, 'three windows in split con after floating toggle');
|
2011-03-09 20:25:17 +01:00
|
|
|
|
|
|
|
done_testing;
|