<div dir="ltr">There is not much else to say. surfaces created with <span style="font-family:arial,sans-serif;font-size:13px">weston_surface_create have </span><div><span style="font-family:arial,sans-serif;font-size:13px">a NULL resource, and if that gets picked by </span><font face="arial, sans-serif">default_grab_focus (in input.c) the next </font></div>
<div><span style="font-family:arial,sans-serif;font-size:13px">seat_get_pointer will break.</span></div><div><font face="arial, sans-serif"><br></font><div><span style="font-family:arial,sans-serif;font-size:13px">I guess another solution could be to make </span><font face="arial, sans-serif">weston_compositor_pick_surface not</font></div>
</div><div><font face="arial, sans-serif">pick surfaces without a valid resource, but i'm not sure that wouldn't break something</font></div><div><font face="arial, sans-serif">else.</font></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">2013/7/8 Rob Bradford <span dir="ltr"><<a href="mailto:robert.bradford@intel.com" target="_blank">robert.bradford@intel.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Can you provide some more explanation in your commit message about why<br>
the pointer might have a surface focussed but that surface does not<br>
have a valid resource. (I'm wondering if this is fixing the symptom of<br>
a problem elsewhere.)<br>
<span class="HOEnZb"><font color="#888888"><br>
Rob<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On 7 July 2013 16:38, Giulio Camuffo <<a href="mailto:giuliocamuffo@gmail.com">giuliocamuffo@gmail.com</a>> wrote:<br>
> seat->pointer->focus->resource can be NULL, if the surface was<br>
> created with weston_surface_create.<br>
> ---<br>
>  src/input.c | 2 +-<br>
>  1 file changed, 1 insertion(+), 1 deletion(-)<br>
><br>
> diff --git a/src/input.c b/src/input.c<br>
> index 644487a..a7a37e5 100644<br>
> --- a/src/input.c<br>
> +++ b/src/input.c<br>
> @@ -1181,7 +1181,7 @@ seat_get_pointer(struct wl_client *client, struct wl_resource *resource,<br>
>         wl_resource_set_implementation(cr, &pointer_interface, seat->pointer,<br>
>                                        unbind_resource);<br>
><br>
> -       if (seat->pointer->focus &&<br>
> +       if (seat->pointer->focus && seat->pointer->focus->resource &&<br>
>             wl_resource_get_client(seat->pointer->focus->resource) == client) {<br>
>                 struct weston_surface *surface;<br>
>                 wl_fixed_t sx, sy;<br>
> --<br>
> 1.8.3.2<br>
><br>
</div></div><div class="HOEnZb"><div class="h5">> _______________________________________________<br>
> wayland-devel mailing list<br>
> <a href="mailto:wayland-devel@lists.freedesktop.org">wayland-devel@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/wayland-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/wayland-devel</a><br>
</div></div></blockquote></div><br></div>