tests: lib/i3test: Remove open_standard_window, introduce open_window

open_window has a better API than open_standard_window. It uses named
parameters and supplies default values for everything you don’t specify. This
way, you can use every feature which X11::XCB::Window supports.
This commit is contained in:
Michael Stapelberg
2011-09-24 15:11:37 +01:00
parent c3eb9f6c45
commit de5286da59
38 changed files with 207 additions and 386 deletions

View File

@ -11,18 +11,7 @@ my $tmp = fresh_workspace;
my $x = X11::XCB::Connection->new;
# Create a floating window which is smaller than the minimum enforced size of i3
my $window = $x->root->create_child(
class => WINDOW_CLASS_INPUT_OUTPUT,
rect => [ 0, 0, 400, 150],
background_color => '#C0C0C0',
event_mask => [ 'structure_notify' ],
);
isa_ok($window, 'X11::XCB::Window');
$window->map;
wait_for_map $x;
my $window = open_window($x, { rect => [ 0, 0, 400, 150 ] });
my ($absolute, $top) = $window->rect;