tests: use two roundtrips for global events

first is for getting and binding to globals and the other one is for
getting wl_shm.formats that are emitted after binding
to wl_shm

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
dev
Marek Chalupa 10 years ago committed by Pekka Paalanen
parent 70ac0edcab
commit a413ff897d
  1. 6
      tests/weston-test-client-helper.c

@ -579,8 +579,10 @@ client_create(int x, int y, int width, int height)
client->wl_registry = wl_display_get_registry(client->wl_display);
wl_registry_add_listener(client->wl_registry, &registry_listener, client);
/* trigger global listener */
wl_display_dispatch(client->wl_display);
/* trigger global listener. Need to dispatch two times, because wl_shm
* will emit new events after binding and we need them to arrive
* before continuing */
wl_display_roundtrip(client->wl_display);
wl_display_roundtrip(client->wl_display);
/* must have WL_SHM_FORMAT_ARGB32 */

Loading…
Cancel
Save