tests: sync_with_i3 before warping pointer

To be honest, I’m not entirely sure where the race condition originates
from, but when making sure that there are no pending events
(which is what sync_with_i3 accomplishes) before warping the pointer, we
have less flaky testsuite runs.

closes #1189
This commit is contained in:
Michael Stapelberg
2014-02-25 20:44:17 +01:00
parent cdbf62d055
commit 07d583d780
7 changed files with 12 additions and 0 deletions

View File

@ -126,6 +126,7 @@ is($nodes->[0]->{focused}, 1, 'fullscreen window focused');
cmd 'fullscreen';
# Focus screen 1
sync_with_i3;
$x->root->warp_pointer(1025, 0);
sync_with_i3;
@ -134,6 +135,7 @@ cmd "workspace $tmp";
my $diff_ws = open_window;
# Focus screen 0
sync_with_i3;
$x->root->warp_pointer(0, 0);
sync_with_i3;