class => WINDOW_CLASS_INPUT_OUTPUT,
rect => $original_rect,
background_color => '#C0C0C0',
+ event_mask => [ 'structure_notify' ],
);
isa_ok($window, 'X11::XCB::Window');
$window->map;
-sleep 0.25;
+wait_for_map $x;
# open another container to make the window get only half of the screen
cmd 'open';
class => WINDOW_CLASS_INPUT_OUTPUT,
rect => $original_rect,
background_color => 61440,
+ event_mask => [ 'structure_notify' ],
);
is_deeply($window->rect, $original_rect, "rect unmodified before mapping");
$window->fullscreen(1);
$window->map;
-sleep(0.25);
+wait_for_map $x;
$new_rect = $window->rect;
ok(!eq_deeply($new_rect, $original_rect), "Window got repositioned after fullscreen");
class => WINDOW_CLASS_INPUT_OUTPUT,
rect => $original_rect,
background_color => '#C0C0C0',
+ event_mask => [ 'structure_notify' ],
);
$swindow->map;
-sleep 0.25;
+
+sync_with_i3($x);
ok(!$swindow->mapped, 'window not mapped while fullscreen window active');
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' ],
);
isa_ok($window, 'X11::XCB::Window');
$window->map;
-sleep 0.25;
+wait_for_map $x;
my ($absolute, $top) = $window->rect;
rect => [ 1, 1, 80, 90],
background_color => '#C0C0C0',
window_type => $x->atom(name => '_NET_WM_WINDOW_TYPE_UTILITY'),
+ event_mask => [ 'structure_notify' ],
);
isa_ok($window, 'X11::XCB::Window');
$window->map;
-sleep 0.25;
+wait_for_map $x;
($absolute, $top) = $window->rect;
rect => [ 1, 1, 80, 90],
background_color => '#C0C0C0',
#window_type => $x->atom(name => '_NET_WM_WINDOW_TYPE_UTILITY'),
+ event_mask => [ 'structure_notify' ],
);
isa_ok($window, 'X11::XCB::Window');
$window->map;
-sleep 0.25;
+wait_for_map $x;
cmd 'floating enable';
}
my $x = X11::XCB::Connection->new;
-my $i3 = i3(get_socket_path());
#####################################################################
# verify that there is no dock window yet
rect => [ 0, 0, 30, 30],
background_color => '#FF0000',
window_type => $x->atom(name => '_NET_WM_WINDOW_TYPE_DOCK'),
+ event_mask => [ 'structure_notify' ],
);
$window->map;
-sleep 0.25;
+wait_for_map $x;
my $rect = $window->rect;
is($rect->width, $primary->rect->width, 'dock client is as wide as the screen');
$window->rect(X11::XCB::Rect->new(x => 0, y => 0, width => 50, height => 40));
-sleep 0.25;
+sync_with_i3 $x;
@docked = get_dock_clients('top');
is(@docked, 1, 'one dock client found');
$window->destroy;
-sleep 0.25;
+wait_for_unmap $x;
@docked = get_dock_clients();
is(@docked, 0, 'no more dock clients');
rect => [ 0, 1000, 30, 30],
background_color => '#FF0000',
window_type => $x->atom(name => '_NET_WM_WINDOW_TYPE_DOCK'),
+ event_mask => [ 'structure_notify' ],
);
$window->map;
-sleep 0.25;
+wait_for_map $x;
my $rect = $window->rect;
is($rect->width, $primary->rect->width, 'dock client is as wide as the screen');
$window->destroy;
-sleep 0.25;
+wait_for_unmap $x;
@docked = get_dock_clients();
is(@docked, 0, 'no more dock clients');
rect => [ 0, 1000, 30, 30],
background_color => '#FF0000',
window_type => $x->atom(name => '_NET_WM_WINDOW_TYPE_DOCK'),
+ event_mask => [ 'structure_notify' ],
);
$window->_create();
$window->map;
-sleep 0.25;
+wait_for_map $x;
@docked = get_dock_clients('top');
is(@docked, 1, 'dock client on top');
$window->destroy;
-sleep 0.25;
+wait_for_unmap $x;
@docked = get_dock_clients();
is(@docked, 0, 'no more dock clients');
rect => [ 0, 1000, 30, 30],
background_color => '#FF0000',
window_type => $x->atom(name => '_NET_WM_WINDOW_TYPE_DOCK'),
+ event_mask => [ 'structure_notify' ],
);
$window->_create();
$window->map;
-sleep 0.25;
+wait_for_map $x;
@docked = get_dock_clients('bottom');
is(@docked, 1, 'dock client on bottom');
rect => [ 0, 0, 30, 30],
background_color => '#FF0000',
window_type => $x->atom(name => '_NET_WM_WINDOW_TYPE_DOCK'),
+ event_mask => [ 'structure_notify' ],
);
$fwindow->transient_for($window);
$fwindow->map;
-sleep 0.25;
+wait_for_map $x;
does_i3_live;
}
my $x = X11::XCB::Connection->new;
-my $i3 = i3(get_socket_path());
my $tmp = fresh_workspace;
class => WINDOW_CLASS_INPUT_OUTPUT,
rect => [0, 0, 30, 30],
background_color => '#FF0000',
+ event_mask => [ 'structure_notify' ],
);
$left->name('Left');
class => WINDOW_CLASS_INPUT_OUTPUT,
rect => [0, 0, 30, 30],
background_color => '#FF0000',
+ event_mask => [ 'structure_notify' ],
);
$right->name('Right');
$right->map;
-sleep 0.25;
+ok(wait_for_map($x), 'left window mapped');
+ok(wait_for_map($x), 'right window mapped');
my ($abs, $rgeom) = $right->rect;
rect => [ 0, 0, 30, 30 ],
background_color => '#C0C0C0',
window_type => $x->atom(name => '_NET_WM_WINDOW_TYPE_UTILITY'),
+ event_mask => [ 'structure_notify' ],
);
$child->name('Child window');
$child->client_leader($right);
$child->map;
-sleep 0.25;
+ok(wait_for_map($x), 'child window mapped');
my $cgeom;
($abs, $cgeom) = $child->rect;
rect => [ 0, 0, 30, 30 ],
background_color => '#C0C0C0',
window_type => $x->atom(name => '_NET_WM_WINDOW_TYPE_UTILITY'),
+ event_mask => [ 'structure_notify' ],
);
$child2->name('Child window 2');
$child2->client_leader($left);
$child2->map;
-sleep 0.25;
+ok(wait_for_map($x), 'second child window mapped');
($abs, $cgeom) = $child2->rect;
cmp_ok(($cgeom->x + $cgeom->width), '<', $rgeom->x, 'child above left window');
class => WINDOW_CLASS_INPUT_OUTPUT,
rect => [ 0, 0, 30, 30],
background_color => '#FF0000',
+ event_mask => [ 'structure_notify' ],
);
$fwindow->transient_for($right);
$fwindow->map;
-sleep 0.25;
+ok(wait_for_map($x), 'transient window mapped');
my ($absolute, $top) = $fwindow->rect;
ok($absolute->{x} != 0 && $absolute->{y} != 0, 'i3 did not map it to (0x0)');
#####################################################################
my $window = $x->root->create_child(
-class => WINDOW_CLASS_INPUT_OUTPUT,
-rect => [ 0, 0, 30, 30 ],
-background_color => '#C0C0C0',
+ class => WINDOW_CLASS_INPUT_OUTPUT,
+ rect => [ 0, 0, 30, 30 ],
+ background_color => '#C0C0C0',
+ event_mask => [ 'structure_notify' ],
);
$window->name('Parent window');
$window->map;
-sleep 0.25;
+ok(wait_for_map($x), 'parent window mapped');
#########################################################################
# Switch to a different workspace and open a child window. It should be opened
fresh_workspace;
my $child = $x->root->create_child(
-class => WINDOW_CLASS_INPUT_OUTPUT,
-rect => [ 0, 0, 30, 30 ],
-background_color => '#C0C0C0',
+ class => WINDOW_CLASS_INPUT_OUTPUT,
+ rect => [ 0, 0, 30, 30 ],
+ background_color => '#C0C0C0',
+ event_mask => [ 'structure_notify' ],
);
$child->name('Child window');
$child->client_leader($window);
$child->map;
-sleep 0.25;
+ok(wait_for_map($x), 'child window mapped');
isnt($x->input_focus, $child->id, "Child window focused");
my $id = $win->{id};
cmd qq|[con_id="$id"] kill|;
-# give i3 some time to pick up the UnmapNotify event
-sleep 0.25;
+wait_for_unmap $x;
cmd 'nop checking if its gone';
$content = get_ws_content($tmp);
class => WINDOW_CLASS_INPUT_OUTPUT,
rect => [ 0, 0, 30, 30 ],
background_color => '#0000ff',
+ event_mask => [ 'structure_notify' ],
);
$left->_create;
set_wm_class($left->id, 'special', 'special');
$left->name('left');
$left->map;
-sleep 0.25;
+ok(wait_for_map($x), 'left window mapped');
my $right = $x->root->create_child(
class => WINDOW_CLASS_INPUT_OUTPUT,
rect => [ 0, 0, 30, 30 ],
background_color => '#0000ff',
+ event_mask => [ 'structure_notify' ],
);
$right->_create;
set_wm_class($right->id, 'special', 'special');
$right->name('right');
$right->map;
-sleep 0.25;
+ok(wait_for_map($x), 'right window mapped');
# two windows should be here
$content = get_ws_content($tmp);
class => WINDOW_CLASS_INPUT_OUTPUT,
rect => [ 0, 0, 30, 30 ],
background_color => '#0000ff',
+ event_mask => [ 'structure_notify' ],
);
$left->_create;
set_wm_class($left->id, 'special7', 'special7');
$left->name('left');
$left->map;
-sleep 0.25;
+ok(wait_for_map($x), 'left window mapped');
# two windows should be here
$content = get_ws_content($tmp);
cmd '[class="^special[0-9]$"] kill';
-sleep 0.25;
+wait_for_unmap $x;
$content = get_ws_content($tmp);
is(@{$content}, 0, 'window killed');
class => WINDOW_CLASS_INPUT_OUTPUT,
rect => [ 0, 0, 30, 30 ],
background_color => '#0000ff',
+ event_mask => [ 'structure_notify' ],
);
$left->_create;
set_wm_class($left->id, 'special7', 'special7');
$left->name('รค 3');
$left->map;
-sleep 0.25;
+ok(wait_for_map($x), 'left window mapped');
# two windows should be here
$content = get_ws_content($tmp);
cmd '[title="^\w [3]$"] kill';
-sleep 0.25;
+wait_for_unmap $x;
$content = get_ws_content($tmp);
is(@{$content}, 0, 'window killed');
#
use i3test;
-my $i3 = i3(get_socket_path());
-
my $x = X11::XCB::Connection->new;
my $tmp = fresh_workspace;
class => WINDOW_CLASS_INPUT_OUTPUT,
rect => X11::XCB::Rect->new(x => 0, y => 0, width => 30, height => 30),
background_color => '#C0C0C0',
+ event_mask => [ 'structure_notify' ],
);
# XXX: we should check screen size. in screens with an AR of 2.0,
$aspect->max_den(300);
$win->_create;
$win->map;
-sleep 0.25;
+wait_for_map $x;
$win->hints->aspect($aspect);
$x->flush;
rect => [ 0, 0, 30, 30],
background_color => '#FF0000',
window_type => $x->atom(name => '_NET_WM_WINDOW_TYPE_DOCK'),
+ event_mask => [ 'structure_notify' ],
);
$window->map;
-sleep 0.25;
+wait_for_map $x;
#####################################################################
# check that we can find it in the layout tree at the expected position
$window->destroy;
-sleep 0.25;
+wait_for_unmap $x;
@docked = get_dock_clients;
is(@docked, 0, 'no dock clients found');
rect => [ 0, 0, 30, 20],
background_color => '#00FF00',
window_type => $x->atom(name => '_NET_WM_WINDOW_TYPE_DOCK'),
+ event_mask => [ 'structure_notify' ],
);
$window->map;
-sleep 0.25;
+wait_for_map $x;
@docked = get_dock_clients;
is(@docked, 1, 'one dock client found');
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;
-sleep 0.25;
+wait_for_map $x;
my ($absolute, $top) = $window->rect;
}
my $x = X11::XCB::Connection->new;
-my $i3 = i3(get_socket_path());
my $tmp = fresh_workspace;
rect => [ 0, 0, 30, 30],
background_color => '#FF0000',
window_type => $x->atom(name => '_NET_WM_WINDOW_TYPE_DOCK'),
+ event_mask => [ 'structure_notify' ],
);
$first->map;
-sleep 0.25;
+wait_for_map $x;
#####################################################################
# Open a second dock client
rect => [ 0, 0, 30, 30],
background_color => '#FF0000',
window_type => $x->atom(name => '_NET_WM_WINDOW_TYPE_DOCK'),
+ event_mask => [ 'structure_notify' ],
);
$second->map;
-sleep 0.25;
+wait_for_map $x;
#####################################################################
# Kill the second dock client
}
my $x = X11::XCB::Connection->new;
-my $i3 = i3(get_socket_path());
my $tmp = fresh_workspace;
class => WINDOW_CLASS_INPUT_OUTPUT,
rect => [ 0, 0, 200, 80],
background_color => '#FF0000',
+ event_mask => [ 'structure_notify' ],
);
$first->map;
-sleep 0.25;
+wait_for_map $x;
#####################################################################
# Open a second window with 300x90
class => WINDOW_CLASS_INPUT_OUTPUT,
rect => [ 0, 0, 300, 90],
background_color => '#00FF00',
+ event_mask => [ 'structure_notify' ],
);
$second->map;
-sleep 0.25;
+wait_for_map $x;
#####################################################################
# Set the parent to floating
# Open a third window
#####################################################################
-my $third = open_standard_window($x, '#0000ff');
+#my $third = open_standard_window($x, '#0000ff');
+
+my $third = $x->root->create_child(
+ class => WINDOW_CLASS_INPUT_OUTPUT,
+ rect => X11::XCB::Rect->new(x => 0, y => 0, width => 30, height => 30 ),
+ background_color => '#0000ff',
+ event_mask => [ 'structure_notify' ],
+);
+
+$third->name('Third window');
+$third->map;
+
+sync_with_i3 $x;
diag("third = " . $third->id);
# Tests if WM_STATE is WM_STATE_NORMAL when mapped and WM_STATE_WITHDRAWN when
# unmapped.
#
-use X11::XCB qw(:all);
-use X11::XCB::Connection;
use i3test;
my $x = X11::XCB::Connection->new;
my $first = open_standard_window($x);
my $second = open_standard_window($x);
+ sync_with_i3 $x;
+
is($x->input_focus, $second->id, 'second window focused');
ok(@{get_ws_content($tmp)} == 2, 'two containers opened');
class => WINDOW_CLASS_INPUT_OUTPUT,
rect => [ 0, 0, 30, 30 ],
background_color => '#00ff00',
+ event_mask => [ 'structure_notify' ],
);
$window->name('Border window');
$window->map;
-sleep 0.25;
+wait_for_map $x;
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;
-sleep 0.25;
+wait_for_unmap $x;
my @content = @{get_ws_content($tmp)};
cmp_ok(@content, '==', 0, 'no more nodes');
class => WINDOW_CLASS_INPUT_OUTPUT,
rect => [ 0, 0, 30, 30 ],
background_color => '#00ff00',
+ event_mask => [ 'structure_notify' ],
);
$window->_create;
set_wm_class($window->id, 'borderless', 'borderless');
$window->name('Borderless window');
$window->map;
-sleep 0.25;
+wait_for_map $x;
@content = @{get_ws_content($tmp)};
cmp_ok(@content, '==', 1, 'one node on this workspace now');
is($content[0]->{border}, 'none', 'no border');
$window->unmap;
-sleep 0.25;
+wait_for_unmap $x;
@content = @{get_ws_content($tmp)};
cmp_ok(@content, '==', 0, 'no more nodes');
class => WINDOW_CLASS_INPUT_OUTPUT,
rect => [ 0, 0, 30, 30 ],
background_color => '#00ff00',
+ event_mask => [ 'structure_notify' ],
);
$window->name('special title');
$window->map;
-sleep 0.25;
+wait_for_map $x;
@content = @{get_ws_content($tmp)};
cmp_ok(@content, '==', 1, 'one node on this workspace now');
is($content[0]->{border}, 'normal', 'normal border');
$window->name('special borderless title');
-sleep 0.25;
+sync_with_i3 $x;
@content = @{get_ws_content($tmp)};
is($content[0]->{border}, 'none', 'no border');
$window->name('special title');
-sleep 0.25;
+sync_with_i3 $x;
cmd 'border normal';
is($content[0]->{border}, 'normal', 'border reset to normal');
$window->name('special borderless title');
-sleep 0.25;
+sync_with_i3 $x;
@content = @{get_ws_content($tmp)};
is($content[0]->{border}, 'normal', 'still normal border');
$window->unmap;
-sleep 0.25;
+wait_for_unmap $x;
@content = @{get_ws_content($tmp)};
cmp_ok(@content, '==', 0, 'no more nodes');
class => WINDOW_CLASS_INPUT_OUTPUT,
rect => [ 0, 0, 30, 30 ],
background_color => '#00ff00',
+ event_mask => [ 'structure_notify' ],
);
$window->name('special mark title');
$window->map;
-sleep 0.25;
+wait_for_map $x;
@content = @{get_ws_content($tmp)};
cmp_ok(@content, '==', 1, 'one node on this workspace now');
class => WINDOW_CLASS_INPUT_OUTPUT,
rect => [ 0, 0, 30, 30 ],
background_color => '#00ff00',
+ event_mask => [ 'structure_notify' ],
);
$window->_create;
set_wm_class($window->id, 'borderless', 'borderless');
$window->name('usethis');
$window->map;
-sleep 0.25;
+wait_for_map $x;
@content = @{get_ws_content($tmp)};
cmp_ok(@content, '==', 1, 'one node on this workspace now');
is($content[0]->{border}, 'none', 'no border');
$window->unmap;
-sleep 0.25;
+wait_for_unmap $x;
@content = @{get_ws_content($tmp)};
cmp_ok(@content, '==', 0, 'no nodes on this workspace now');
set_wm_class($window->id, 'borderless', 'borderless');
$window->name('notthis');
$window->map;
-sleep 0.25;
+wait_for_map $x;
@content = @{get_ws_content($tmp)};
cmp_ok(@content, '==', 1, 'one node on this workspace now');
class => WINDOW_CLASS_INPUT_OUTPUT,
rect => [ 0, 0, 30, 30 ],
background_color => '#00ff00',
+ event_mask => [ 'structure_notify' ],
);
$window->_create;
set_wm_class($window->id, 'bar', 'foo');
$window->name('usethis');
$window->map;
-sleep 0.25;
+wait_for_map $x;
@content = @{get_ws_content($tmp)};
cmp_ok(@content, '==', 1, 'one node on this workspace now');
class => WINDOW_CLASS_INPUT_OUTPUT,
rect => [ 0, 0, 30, 30 ],
background_color => '#00ff00',
+ event_mask => [ 'structure_notify' ],
);
$window->_create;
set_wm_class($window->id, 'bar', 'foo');
$window->name('usethis');
$window->map;
-sleep 0.25;
+wait_for_map $x;
@content = @{get_ws_content($tmp)};
cmp_ok(@content, '==', 1, 'one node on this workspace now');
class => WINDOW_CLASS_INPUT_OUTPUT,
rect => [ 0, 0, 30, 30 ],
background_color => '#00ff00',
+ event_mask => [ 'structure_notify' ],
);
$window->_create;
set_wm_class($window->id, 'bar', 'foo');
$window->name('usethis');
$window->map;
-sleep 0.25;
+wait_for_map $x;
@content = @{get_ws_content($tmp)};
cmp_ok(@content, '==', 1, 'one node on this workspace now');
class => WINDOW_CLASS_INPUT_OUTPUT,
rect => [ 0, 0, 30, 30 ],
background_color => '#00ff00',
+ event_mask => [ 'structure_notify' ],
);
$window->_create;
$window->name('usethis');
$window->map;
-sleep 0.25;
+wait_for_map $x;
@content = @{get_ws_content($tmp)};
cmp_ok(@content, '==', 1, 'one node on this workspace now');
class => WINDOW_CLASS_INPUT_OUTPUT,
rect => [ 0, 0, 30, 30 ],
background_color => '#00ff00',
+ event_mask => [ 'structure_notify' ],
);
$window->_create;
$window->name('usethis');
$window->map;
-sleep 0.25;
+wait_for_map $x;
@content = @{get_ws_content($tmp)};
cmp_ok(@content, '==', 1, 'one node on this workspace now');
$x->flush;
-sleep 0.25;
+sync_with_i3 $x;
@content = @{get_ws_content($tmp)};
cmp_ok(@content, '==', 1, 'one node on this workspace now');
class => WINDOW_CLASS_INPUT_OUTPUT,
rect => [ 0, 0, 30, 30 ],
background_color => '#0000ff',
+ event_mask => [ 'structure_notify' ],
);
$window->_create;
set_wm_class($window->id, 'special', 'special');
$window->name('special window');
$window->map;
-sleep 0.25;
+wait_for_map $x;
ok(@{get_ws_content($tmp)} == 1, 'special window got managed to current (random) workspace');
$window->destroy;
-sleep 0.25;
-
#####################################################################
# start a window and see that it gets assigned to a formerly unused
# workspace
class => WINDOW_CLASS_INPUT_OUTPUT,
rect => [ 0, 0, 30, 30 ],
background_color => '#0000ff',
+ event_mask => [ 'structure_notify' ],
);
$window->_create;
set_wm_class($window->id, 'special', 'special');
$window->name('special window');
$window->map;
-sleep 0.25;
+wait_for_map $x;
ok(@{get_ws_content($tmp)} == 0, 'still no containers');
ok("targetws" ~~ @{get_workspace_names()}, 'targetws exists');
class => WINDOW_CLASS_INPUT_OUTPUT,
rect => [ 0, 0, 30, 30 ],
background_color => '#0000ff',
+ event_mask => [ 'structure_notify' ],
);
$window->_create;
set_wm_class($window->id, 'special', 'special');
$window->name('special window');
$window->map;
-sleep 0.25;
+
+# We use sync_with_i3 instead of wait_for_map here because i3 will not actually
+# map the window -- it will be assigned to a different workspace and will only
+# be mapped once you switch to that workspace
+sync_with_i3 $x;
ok(@{get_ws_content($tmp)} == 0, 'still no containers');
ok(@{get_ws_content('targetws')} == 2, 'two containers on targetws');
class => WINDOW_CLASS_INPUT_OUTPUT,
rect => [ 0, 0, 30, 30 ],
background_color => '#0000ff',
+ event_mask => [ 'structure_notify' ],
);
$window->_create;
set_wm_class($window->id, 'special', 'special');
$window->name('special window');
$window->map;
-sleep 0.25;
+wait_for_map $x;
my $content = get_ws($tmp);
ok(@{$content->{nodes}} == 0, 'no tiling cons');
class => WINDOW_CLASS_INPUT_OUTPUT,
rect => [ 0, 0, 30, 30 ],
background_color => '#0000ff',
+ event_mask => [ 'structure_notify' ],
);
$window->_create;
set_wm_class($window->id, 'SPEcial', 'SPEcial');
$window->name('special window');
$window->map;
-sleep 0.25;
+wait_for_map $x;
my $content = get_ws($tmp);
ok(@{$content->{nodes}} == 0, 'no tiling cons');
rect => [ 0, 0, 30, 30 ],
background_color => '#0000ff',
window_type => $x->atom(name => '_NET_WM_WINDOW_TYPE_DOCK'),
+ event_mask => [ 'structure_notify' ],
);
$window->_create;
set_wm_class($window->id, 'special', 'special');
$window->name('special window');
$window->map;
-sleep 0.25;
+wait_for_map $x;
my $content = get_ws($tmp);
ok(@{$content->{nodes}} == 0, 'no tiling cons');
#
use i3test;
-use X11::XCB qw(:all);
-use X11::XCB::Connection;
my $x = X11::XCB::Connection->new;
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;
-sleep 0.25;
+wait_for_map $x;
my $wscontent = get_ws($tmp);
my @floating = @{$wscontent->{floating_nodes}};
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;
-sleep 0.25;
+wait_for_map $x;
$wscontent = get_ws($tmp);
@floating = @{$wscontent->{floating_nodes}};