# if only a floating window is present on the workspace.
use i3test;
-use X11::XCB qw(:all);
-
-BEGIN {
- use_ok('X11::XCB::Window');
-}
my $i3 = i3(get_socket_path());
# 1: open a floating window, get it mapped
#############################################################################
-my $x = X11::XCB::Connection->new;
-
# Create a floating window
my $window = open_floating_window($x);
ok($window->mapped, 'Window is mapped');
is(@{$nodes}, 0, 'no tiling nodes');
# Create a tiling window
-my $twindow = open_window($x);
+my $twindow = open_window;
($nodes, $focus) = get_ws_content($tmp);
$tmp = fresh_workspace;
-my $first = open_window($x);
-my $second = open_window($x);
+my $first = open_window;
+my $second = open_window;
cmd 'layout stacked';
is(@{$ws->{nodes}}, 1, 'one tiling node (stacked con)');
# Create a floating window
-my $window = open_floating_window($x);
+$window = open_floating_window($x);
ok($window->mapped, 'Window is mapped');
$ws = get_ws($tmp);
is(@{$ws->{floating_nodes}}, 1, 'one floating nodes');
is(@{$ws->{nodes}}, 1, 'one tiling node (stacked con)');
-my $third = open_window($x);
+my $third = open_window;
$ws = get_ws($tmp);