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

Marek Chalupa mchqwerty at gmail.com
Mon Feb 1 05:38:41 PST 2016


I ran into the same issue with gtk3-demo.
When the popup was being destroyed, the focus was set to 0x0 and I got 
sigsegv, because popup grab tried to sent the frame.

Reviewed-by: Marek Chalupa <mchqwerty at gmail.com>

Regards,
Marek


On 01/29/2016 05:29 PM, 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>
> ---
>   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);
>


More information about the wayland-devel mailing list