t/323-net-frame-extents: wait for window to close before proceeding

This test was flaky because it issued a 'kill' command through i3
and assumed that focus would immediately be different afterwards.

However, the 'kill' command (via x_window_kill) only results in an
xcb_destroy_window() request to X11, not in a focus change.
Only when i3 processes the X11 server response to this request
will focus change back to the window that should be changed with
the 'border normal 0' command.

related to https://github.com/i3/i3/issues/3009
This commit is contained in:
Michael Stapelberg
2025-12-22 15:43:03 +01:00
committed by Michael Stapelberg
parent be440e0146
commit 071aa15e51

View File

@ -64,9 +64,10 @@ subtest 'basic border styles' => sub {
cmd 'border pixel 5'; cmd 'border pixel 5';
is_net_frame_extents($w, [5, 5, 5, 5], "pixel border with 5px width"); is_net_frame_extents($w, [5, 5, 5, 5], "pixel border with 5px width");
open_window; my $other = open_window;
is_net_frame_extents($w, [5, 5, 5, 5], "other window does not affect"); is_net_frame_extents($w, [5, 5, 5, 5], "other window does not affect");
cmd 'kill'; $other->destroy;
wait_for_unmap $other;
cmd 'border normal 0'; cmd 'border normal 0';
is_net_frame_extents($w, [0, 0, 18, 0], "normal border with 0px width"); is_net_frame_extents($w, [0, 0, 18, 0], "normal border with 0px width");