From 071aa15e514c25aa6d663a6bc59ddce2c4c6e22d Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Mon, 22 Dec 2025 15:43:03 +0100 Subject: [PATCH] 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 --- testcases/t/323-net-frame-extents.t | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/testcases/t/323-net-frame-extents.t b/testcases/t/323-net-frame-extents.t index 3f5e6905..6911984d 100644 --- a/testcases/t/323-net-frame-extents.t +++ b/testcases/t/323-net-frame-extents.t @@ -64,9 +64,10 @@ subtest 'basic border styles' => sub { cmd 'border pixel 5'; 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"); - cmd 'kill'; + $other->destroy; + wait_for_unmap $other; cmd 'border normal 0'; is_net_frame_extents($w, [0, 0, 18, 0], "normal border with 0px width");