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:
@ -25,7 +25,7 @@ my $tmp = fresh_workspace;
|
||||
|
||||
ok(@{get_ws_content($tmp)} == 0, 'no containers yet');
|
||||
|
||||
my $first = open_standard_window($x);
|
||||
my $first = open_window($x);
|
||||
|
||||
my @content = @{get_ws_content($tmp)};
|
||||
ok(@content == 1, 'one container opened');
|
||||
@ -51,7 +51,7 @@ $tmp = fresh_workspace;
|
||||
|
||||
ok(@{get_ws_content($tmp)} == 0, 'no containers yet');
|
||||
|
||||
$first = open_standard_window($x);
|
||||
$first = open_window($x);
|
||||
|
||||
@content = @{get_ws_content($tmp)};
|
||||
ok(@content == 1, 'one container opened');
|
||||
@ -75,19 +75,7 @@ $tmp = fresh_workspace;
|
||||
|
||||
ok(@{get_ws_content($tmp)} == 0, 'no containers yet');
|
||||
|
||||
# Create a floating window which is smaller than the minimum enforced size of i3
|
||||
$first = $x->root->create_child(
|
||||
class => WINDOW_CLASS_INPUT_OUTPUT,
|
||||
rect => [ 0, 0, 30, 30],
|
||||
background_color => '#C0C0C0',
|
||||
# replace the type with 'utility' as soon as the coercion works again in X11::XCB
|
||||
window_type => $x->atom(name => '_NET_WM_WINDOW_TYPE_UTILITY'),
|
||||
event_mask => [ 'structure_notify' ],
|
||||
);
|
||||
|
||||
$first->map;
|
||||
|
||||
wait_for_map $x;
|
||||
$first = open_floating_window($x);
|
||||
|
||||
my $wscontent = get_ws($tmp);
|
||||
my @floating = @{$wscontent->{floating_nodes}};
|
||||
@ -115,19 +103,7 @@ $tmp = fresh_workspace;
|
||||
|
||||
ok(@{get_ws_content($tmp)} == 0, 'no containers yet');
|
||||
|
||||
# Create a floating window which is smaller than the minimum enforced size of i3
|
||||
$first = $x->root->create_child(
|
||||
class => WINDOW_CLASS_INPUT_OUTPUT,
|
||||
rect => [ 0, 0, 30, 30],
|
||||
background_color => '#C0C0C0',
|
||||
# replace the type with 'utility' as soon as the coercion works again in X11::XCB
|
||||
window_type => $x->atom(name => '_NET_WM_WINDOW_TYPE_UTILITY'),
|
||||
event_mask => [ 'structure_notify' ],
|
||||
);
|
||||
|
||||
$first->map;
|
||||
|
||||
wait_for_map $x;
|
||||
$first = open_floating_window($x);
|
||||
|
||||
$wscontent = get_ws($tmp);
|
||||
@floating = @{$wscontent->{floating_nodes}};
|
||||
|
Reference in New Issue
Block a user