button-test: Use wl_display_roundtrip instead of yield()
authorKristian Høgsberg <krh@bitplanet.net>
Wed, 12 Dec 2012 02:56:13 +0000 (21:56 -0500)
committerKristian Høgsberg <krh@bitplanet.net>
Wed, 12 Dec 2012 02:58:22 +0000 (21:58 -0500)
commitf63fab724111af4927b9e36d0ffbbcf3e870f2d0
tree8c3ec0a4c44cbf8ac2b5306e8f8b43c56f4155db
parentdb6dc7d47024a82d6a979888ade2067bda4dc563
button-test: Use wl_display_roundtrip instead of yield()

A round trip is sufficient here.  We need to make sure that the server
has received the wl_test request and that we've received the event
that the request triggers.  The wl_display_roundtrip() helper does
exactly that: it sends a wl_display.sync request, which will hit the
server after the wl_test requests and thus the wl_callback.done event
will come back after the server has seen all the previous requests and
after we've handled all preceeding event.
tests/button-test.c