Fix t/158-wm_take_focus, it was not properly verifying events (Thanks TonyC)

See also http://cr.i3wm.org/patch/500 for TonyC’s patch. This version
reduces code duplication.
This commit is contained in:
Michael Stapelberg
2014-04-09 21:47:32 +02:00
parent 2dfabc38f8
commit e84fa22bb8
2 changed files with 25 additions and 4 deletions

View File

@ -714,6 +714,8 @@ sub sync_with_i3 {
# event mask, it will get the ClientMessage.
$x->send_event(0, $root, EVENT_MASK_SUBSTRUCTURE_REDIRECT, $msg);
return $myrnd if $args{dont_wait_for_event};
# now wait until the reply is here
return wait_for_event 2, sub {
my ($event) = @_;