[PATCH weston] tests: use two roundtrips for global events

Pekka Paalanen ppaalanen at gmail.com
Thu Mar 19 07:52:45 PDT 2015


On Thu, 19 Mar 2015 03:35:40 -0400
Marek Chalupa <mchqwerty at gmail.com> wrote:

> 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 at gmail.com>
> ---
>  tests/weston-test-client-helper.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/weston-test-client-helper.c b/tests/weston-test-client-helper.c
> index fa11bc1..cf9e742 100644
> --- a/tests/weston-test-client-helper.c
> +++ b/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 */

Pushed.
   70ac0ed..a413ff8  master -> master


Thanks,
pq


More information about the wayland-devel mailing list