testcases: use $x in wait_for_(un)map change to wait_for_(un)map($win)
wait_for_unmap currently ignores its $window parameter, since X11::XCB doesn't provide $event->{window} for unmap events yet.
This commit is contained in:
committed by
Michael Stapelberg
parent
65471a6b18
commit
da403b3667
@ -34,14 +34,14 @@ my $window = $x->root->create_child(
|
||||
|
||||
$window->name('Border window');
|
||||
$window->map;
|
||||
wait_for_map $x;
|
||||
wait_for_map $window;
|
||||
|
||||
my @content = @{get_ws_content($tmp)};
|
||||
cmp_ok(@content, '==', 1, 'one node on this workspace now');
|
||||
is($content[0]->{border}, 'normal', 'normal border');
|
||||
|
||||
$window->unmap;
|
||||
wait_for_unmap $x;
|
||||
wait_for_unmap $window;
|
||||
|
||||
@content = @{get_ws_content($tmp)};
|
||||
cmp_ok(@content, '==', 0, 'no more nodes');
|
||||
@ -78,14 +78,14 @@ sub set_wm_class {
|
||||
set_wm_class($window->id, 'borderless', 'borderless');
|
||||
$window->name('Borderless window');
|
||||
$window->map;
|
||||
wait_for_map $x;
|
||||
wait_for_map $window;
|
||||
|
||||
@content = @{get_ws_content($tmp)};
|
||||
cmp_ok(@content, '==', 1, 'one node on this workspace now');
|
||||
is($content[0]->{border}, 'none', 'no border');
|
||||
|
||||
$window->unmap;
|
||||
wait_for_unmap $x;
|
||||
wait_for_unmap $window;
|
||||
|
||||
@content = @{get_ws_content($tmp)};
|
||||
cmp_ok(@content, '==', 0, 'no more nodes');
|
||||
@ -117,7 +117,7 @@ $window = $x->root->create_child(
|
||||
|
||||
$window->name('special title');
|
||||
$window->map;
|
||||
wait_for_map $x;
|
||||
wait_for_map $window;
|
||||
|
||||
@content = @{get_ws_content($tmp)};
|
||||
cmp_ok(@content, '==', 1, 'one node on this workspace now');
|
||||
@ -144,7 +144,7 @@ sync_with_i3 $x;
|
||||
is($content[0]->{border}, 'normal', 'still normal border');
|
||||
|
||||
$window->unmap;
|
||||
wait_for_unmap $x;
|
||||
wait_for_unmap $window;
|
||||
|
||||
@content = @{get_ws_content($tmp)};
|
||||
cmp_ok(@content, '==', 0, 'no more nodes');
|
||||
@ -177,7 +177,7 @@ $window = $x->root->create_child(
|
||||
|
||||
$window->name('special mark title');
|
||||
$window->map;
|
||||
wait_for_map $x;
|
||||
wait_for_map $window;
|
||||
|
||||
@content = @{get_ws_content($tmp)};
|
||||
cmp_ok(@content, '==', 1, 'one node on this workspace now');
|
||||
@ -224,14 +224,14 @@ $window->_create;
|
||||
set_wm_class($window->id, 'borderless', 'borderless');
|
||||
$window->name('usethis');
|
||||
$window->map;
|
||||
wait_for_map $x;
|
||||
wait_for_map $window;
|
||||
|
||||
@content = @{get_ws_content($tmp)};
|
||||
cmp_ok(@content, '==', 1, 'one node on this workspace now');
|
||||
is($content[0]->{border}, 'none', 'no border');
|
||||
|
||||
cmd 'kill';
|
||||
wait_for_unmap $x;
|
||||
wait_for_unmap $window;
|
||||
$window->destroy;
|
||||
|
||||
# give i3 a chance to delete the window from its tree
|
||||
@ -245,7 +245,7 @@ $window->_create;
|
||||
set_wm_class($window->id, 'borderless', 'borderless');
|
||||
$window->name('notthis');
|
||||
$window->map;
|
||||
wait_for_map $x;
|
||||
wait_for_map $window;
|
||||
|
||||
@content = @{get_ws_content($tmp)};
|
||||
cmp_ok(@content, '==', 1, 'one node on this workspace now');
|
||||
@ -280,7 +280,7 @@ $window->_create;
|
||||
set_wm_class($window->id, 'bar', 'foo');
|
||||
$window->name('usethis');
|
||||
$window->map;
|
||||
wait_for_map $x;
|
||||
wait_for_map $window;
|
||||
|
||||
@content = @{get_ws_content($tmp)};
|
||||
cmp_ok(@content, '==', 1, 'one node on this workspace now');
|
||||
@ -315,7 +315,7 @@ $window->_create;
|
||||
set_wm_class($window->id, 'bar', 'foo');
|
||||
$window->name('usethis');
|
||||
$window->map;
|
||||
wait_for_map $x;
|
||||
wait_for_map $window;
|
||||
|
||||
@content = @{get_ws_content($tmp)};
|
||||
cmp_ok(@content, '==', 1, 'one node on this workspace now');
|
||||
@ -352,7 +352,7 @@ $window->_create;
|
||||
set_wm_class($window->id, 'bar', 'foo');
|
||||
$window->name('usethis');
|
||||
$window->map;
|
||||
wait_for_map $x;
|
||||
wait_for_map $window;
|
||||
|
||||
@content = @{get_ws_content($tmp)};
|
||||
cmp_ok(@content, '==', 1, 'one node on this workspace now');
|
||||
@ -400,7 +400,7 @@ $x->change_property(
|
||||
|
||||
$window->name('usethis');
|
||||
$window->map;
|
||||
wait_for_map $x;
|
||||
wait_for_map $window;
|
||||
|
||||
@content = @{get_ws_content($tmp)};
|
||||
cmp_ok(@content, '==', 1, 'one node on this workspace now');
|
||||
@ -437,7 +437,7 @@ $window->_create;
|
||||
|
||||
$window->name('usethis');
|
||||
$window->map;
|
||||
wait_for_map $x;
|
||||
wait_for_map $window;
|
||||
|
||||
@content = @{get_ws_content($tmp)};
|
||||
cmp_ok(@content, '==', 1, 'one node on this workspace now');
|
||||
|
Reference in New Issue
Block a user