]> git.sur5r.net Git - i3/i3/blobdiff - testcases/t/138-floating-attach.t
testcases: drop open_window()s $x parameter, use global one instead
[i3/i3] / testcases / t / 138-floating-attach.t
index b08190a22036ba320f40848fcb83294411917fd3..71f10ef54c25ed717a2578deffd8ba2ee0cd81c2 100644 (file)
@@ -4,11 +4,6 @@
 # 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());
 
@@ -18,8 +13,6 @@ my $tmp = fresh_workspace;
 # 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');
@@ -31,7 +24,7 @@ is(@{$ws->{floating_nodes}}, 1, 'one floating node');
 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);
 
@@ -44,8 +37,8 @@ is(@{$nodes}, 1, 'one tiling node');
 
 $tmp = fresh_workspace;
 
-my $first = open_window($x);
-my $second = open_window($x);
+my $first = open_window;
+my $second = open_window;
 
 cmd 'layout stacked';
 
@@ -54,14 +47,14 @@ is(@{$ws->{floating_nodes}}, 0, 'no floating nodes so far');
 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);