[PATCH weston] clients: add global_remove handler stubs

Pekka Paalanen ppaalanen at gmail.com
Tue Jan 22 05:15:57 PST 2013


On Tue, 22 Jan 2013 14:53:55 +0200
Pekka Paalanen <ppaalanen at gmail.com> wrote:

> All the clients here were missing the global_remove handler. Because
> window.c did not have it, weston-desktop-shell and weston-keyboard
> segfaulted on compositor exit, as they received some
> wl_registry.global_remove events.
> 
> Add more or less stub global_remove handlers, so that clients do not
> crash on such events. Toytoolkit and all applications would need a lot
> more code to properly handle the global object removal.
> 
> Signed-off-by: Pekka Paalanen <ppaalanen at gmail.com>

Other places missing this are:
Weston: compositor-wayland.c, weston-test-client-helper.c
Mesa: platform_wayland.c, native_drm.c, native_shm.c
and the Weston 1.0 branch


Argh,
pq

> diff --git a/clients/simple-egl.c b/clients/simple-egl.c
> index b84fae3..26ebe5c 100644
> --- a/clients/simple-egl.c
> +++ b/clients/simple-egl.c
> @@ -588,8 +588,15 @@ registry_handle_global(void *data, struct wl_registry *registry,
>  	}
>  }
>  
> +static void
> +registry_handle_global_remove(void *data, struct wl_registry *registry,
> +			      uint32_t name)
> +{
> +}
> +
>  static const struct wl_registry_listener registry_listener = {
> -	registry_handle_global
> +	registry_handle_global,
> +	registry_handle_global_remove
>  };
>  
>  static void


More information about the wayland-devel mailing list