use i3test;
-my $x = X11::XCB::Connection->new;
-
fresh_workspace;
cmd 'split h';
-my $tiled_left = open_window($x);
-my $tiled_right = open_window($x);
+my $tiled_left = open_window;
+my $tiled_right = open_window;
# Get input focus before creating the floating window
my $focus = $x->input_focus;
$window->unmap;
-wait_for_unmap($x);
+wait_for_unmap $window;
is($x->input_focus, $focus, 'Focus correctly restored');