test-client: Make sure we process pending eevents before we verify state
authorKristian Høgsberg <krh@bitplanet.net>
Mon, 22 Oct 2012 02:30:26 +0000 (22:30 -0400)
committerKristian Høgsberg <krh@bitplanet.net>
Mon, 22 Oct 2012 02:30:26 +0000 (22:30 -0400)
commit128ee2c34290a109d425eb7aacd48892bfeb4452
treebba87e4d0e2ccacd23c2f4a83f2c953b0ab38a44
parent1d1e0a5ffaa91dcbdc1f18e0e5c43a2dc92f5875
test-client: Make sure we process pending eevents before we verify state

Since the send-button-state request comes in on one socket and the
wayland event we're looking for comes in on another socket, the order
that we process the two in is undefined.  Thus, button-test fails
intermittently, depending on which event we process first.

We change wl_display_flush() to wl_display_roundtrip(), to make sure that
we deal with all wayland events before handling test protocol requests.
tests/test-client.c