[PATCH weston] input: Don't try to send pointer frames if no focus_client

Jonas Ådahl jadahl at gmail.com
Fri Jan 29 17:16:08 PST 2016


On Fri, Jan 29, 2016 at 10:29:46AM -0600, Derek Foreman wrote:
> Prevents a segfault when mousing into clients that don't get_pointer
> like weston-simple-shm and weston-simple-damage.
> 
> Signed-off-by: Derek Foreman <derekf at osg.samsung.com>

Reviewed-by: Jonas Ådahl <jadahl at gmail.com>

This fixes what seems to be part of 
https://bugs.freedesktop.org/show_bug.cgi?id=93833 .

Jonas

> ---
>  src/input.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/src/input.c b/src/input.c
> index 91813ec..2539fa7 100644
> --- a/src/input.c
> +++ b/src/input.c
> @@ -390,6 +390,9 @@ weston_pointer_send_frame(struct weston_pointer *pointer)
>  	struct wl_resource *resource;
>  	struct wl_list *resource_list;
>  
> +	if (!pointer->focus_client)
> +		return;
> +
>  	resource_list = &pointer->focus_client->pointer_resources;
>  	wl_resource_for_each(resource, resource_list)
>  		pointer_send_frame(resource);
> -- 
> 2.7.0
> 


More information about the wayland-devel mailing list