[PATCH weston 1/2] compositor: Implement release request for input interfaces

Jason Ekstrand jason at jlekstrand.net
Wed Aug 14 09:30:52 PDT 2013


On Aug 14, 2013 5:14 AM, "Daniel Stone" <daniel at fooishbar.org> wrote:
>
> On 14 August 2013 10:03, Rob Bradford <robert.bradford at intel.com> wrote:
> > On 13 August 2013 20:11, Rob Bradford <robert.bradford at intel.com> wrote:
> >> +static void
> >> +pointer_release(struct wl_client *client, struct wl_resource
*resource)
> >> +{
> >> +       wl_resource_destroy(resource);
> >> +}
> >> +
> >
> > Wondering if we should also send leave events here if the pointer has
> > a focus...The only other time we destroy an input resource is because
> > the client has gone away and in that case the surface too. Perhaps
> > worth extending the testing to enable pairs of get_pointer/release.
>
> In principle I like this, since it avoids a roundtrip to know that you
> won't get any more events from the device, but also hits the whole
> non-null vs. zombie object problem, no?
>
> Cheers,
> Daniel

Yes, this explicitly causes the same NULL proxy problem. I really don't see
how a leave event is appropriate here. That would kind of change what a
leave event means because the pointer may not have left anything. Since we
don't want to send to all the other resources associated to that pointer,
this leave event would also be resource-specific and not pointer-specific.

Also, I would expect clients to call wl_proxy_destroy immediately after
calling wl_pointer_release anyway and in this case they simply won't get
anymore events.

--Jason Ekstrand
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20130814/434f893c/attachment.html>


More information about the wayland-devel mailing list