testcases: drop open_floating_window()s $x parameter, use global

This commit is contained in:
Maik Fischer 2011-11-22 01:00:54 +01:00 committed by Michael Stapelberg
parent f7f1ec5dab
commit 293517fb2e
11 changed files with 16 additions and 16 deletions

View File

@ -181,7 +181,7 @@ sub open_window {
# Thin wrapper around open_window which sets window_type to
# _NET_WM_WINDOW_TYPE_UTILITY to make the window floating.
sub open_floating_window {
my ($x, $args) = @_;
my ($args) = @_;
my %args = ($args ? %$args : ());
$args{window_type} = $x->atom(name => '_NET_WM_WINDOW_TYPE_UTILITY');

View File

@ -15,7 +15,7 @@ my $tiled_right = open_window;
my $focus = $x->input_focus;
# Create a floating window which is smaller than the minimum enforced size of i3
my $window = open_floating_window($x);
my $window = open_floating_window;
is($x->input_focus, $window->id, 'floating window focused');

View File

@ -9,7 +9,7 @@ fresh_workspace;
# Create a floating window and see if resizing works
#####################################################################
my $window = open_floating_window($x);
my $window = open_floating_window;
# See if configurerequests cause window movements (they should not)
my ($a, $t) = $window->rect;

View File

@ -18,7 +18,7 @@ my $right = open_window({ name => 'Right' });
my ($abs, $rgeom) = $right->rect;
my $child = open_floating_window($x, {
my $child = open_floating_window({
dont_map => 1,
name => 'Child window',
});
@ -31,7 +31,7 @@ my $cgeom;
($abs, $cgeom) = $child->rect;
cmp_ok($cgeom->x, '>=', $rgeom->x, 'Child X >= right container X');
my $child2 = open_floating_window($x, {
my $child2 = open_floating_window({
dont_map => 1,
name => 'Child window 2',
});

View File

@ -136,7 +136,7 @@ is(@{$content}, 1, 'only one nodes on this workspace');
######################################################################
$tmp = fresh_workspace;
my $floatwin = open_floating_window($x);
my $floatwin = open_floating_window;
my ($absolute_before, $top_before) = $floatwin->rect;
cmd 'move left';

View File

@ -176,9 +176,9 @@ is($x->input_focus, $second->id, 'second (floating) container focused');
$tmp = fresh_workspace;
$first = open_floating_window($x, { background_color => '#ff0000' });# window 10
$second = open_floating_window($x, { background_color => '#00ff00' }); # window 11
$third = open_floating_window($x, { background_color => '#0000ff' }); # window 12
$first = open_floating_window({ background_color => '#ff0000' });# window 10
$second = open_floating_window({ background_color => '#00ff00' }); # window 11
$third = open_floating_window({ background_color => '#0000ff' }); # window 12
sync_with_i3($x);

View File

@ -15,7 +15,7 @@ my $tmp = fresh_workspace;
ok(workspace_exists($tmp), "workspace $tmp exists");
# Create a floating window which is smaller than the minimum enforced size of i3
my $window = open_floating_window($x);
my $window = open_floating_window;
ok($window->mapped, 'Window is mapped');
# switch to a different workspace, see if the window is still mapped?

View File

@ -14,7 +14,7 @@ my $tmp = fresh_workspace;
#############################################################################
# Create a floating window which is smaller than the minimum enforced size of i3
my $window = open_floating_window($x);
my $window = open_floating_window;
ok($window->mapped, 'Window is mapped');
# switch to a different workspace, see if the window is still mapped?

View File

@ -14,7 +14,7 @@ my $tmp = fresh_workspace;
#############################################################################
# Create a floating window
my $window = open_floating_window($x);
my $window = open_floating_window;
ok($window->mapped, 'Window is mapped');
my $ws = get_ws($tmp);
@ -47,7 +47,7 @@ is(@{$ws->{floating_nodes}}, 0, 'no floating nodes so far');
is(@{$ws->{nodes}}, 1, 'one tiling node (stacked con)');
# Create a floating window
$window = open_floating_window($x);
$window = open_floating_window;
ok($window->mapped, 'Window is mapped');
$ws = get_ws($tmp);

View File

@ -18,7 +18,7 @@ my ($nodes, $focus) = get_ws_content($tmp);
#############################################################################
# Create a floating window
my $window = open_floating_window($x);
my $window = open_floating_window;
ok($window->mapped, 'Window is mapped');
($nodes, $focus) = get_ws_content($tmp);

View File

@ -73,7 +73,7 @@ $tmp = fresh_workspace;
ok(@{get_ws_content($tmp)} == 0, 'no containers yet');
$first = open_floating_window($x);
$first = open_floating_window;
my $wscontent = get_ws($tmp);
my @floating = @{$wscontent->{floating_nodes}};
@ -101,7 +101,7 @@ $tmp = fresh_workspace;
ok(@{get_ws_content($tmp)} == 0, 'no containers yet');
$first = open_floating_window($x);
$first = open_floating_window;
$wscontent = get_ws($tmp);
@floating = @{$wscontent->{floating_nodes}};