X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=testcases%2Ft%2F158-wm_take_focus.t;h=c4d305750183b9f020cc939f9740e132100a903c;hb=0618ef649ec182ed00f3249e7410b5c7fe780860;hp=94476bbd857d3cd1d08d86c92eecdf02dfaed882;hpb=c7ea8c42b679be191e843f653f5024846ce42fe9;p=i3%2Fi3 diff --git a/testcases/t/158-wm_take_focus.t b/testcases/t/158-wm_take_focus.t index 94476bbd..c4d30575 100644 --- a/testcases/t/158-wm_take_focus.t +++ b/testcases/t/158-wm_take_focus.t @@ -9,8 +9,10 @@ subtest 'Window without WM_TAKE_FOCUS', sub { fresh_workspace; my $window = open_window; - - ok(!wait_for_event(1, sub { $_[0]->{response_type} == 161 }), 'did not receive ClientMessage'); + # sync_with_i3 will send a ClientMessage to i3 and receive one targeted to + # $window->id. If it receives WM_TAKE_FOCUS instead, it will return 0, thus + # the test will fail. + ok(sync_with_i3(window_id => $window->id), 'did not receive ClientMessage'); done_testing; };