Destroy requests (Re: [PATCH] protocol: Add a request and event to identify the visible area for a surface)

Pekka Paalanen ppaalanen at
Tue Jan 29 00:39:37 PST 2013

On Mon, 28 Jan 2013 13:32:54 -0500
Kristian Høgsberg <hoegsberg at> wrote:

> On Mon, Jan 28, 2013 at 05:18:34PM +0000, Rob Bradford wrote:
> > From: Rob Bradford <rob at>
> > 
> > Add a probe_area request to the wl_shell_surface interface along
> > with a visible_area event to communicate the result of the probe.
> > 
> > The intention of this request and event is to allow the client to
> > try and refine the placement of popup windows that would otherwise
> > be unusable.
> This looks good.  The separate result object makes it pretty simple
> and allows for sending off a bunch of queries and get a bunch of
> replies using only one ruondtrip.
> I think we should document the self-destructing nature of the results
> object though.  I know that wl_callback (only other object with this
> behavior) isn't documented like that, but we should do that for new
> interfaces.

While at it, should we also have a rule or a strong recommendation,
that all protocol interfaces must have the destroy request, except the
one-shot self-destructing ones like wl_callback and wl_probe_result?

At least we could require an explanation if a new interface comes
without a destroy request. I believe it should avoid the problems we
now have with output or input interfaces. Maybe you already do this.

Any interface that has, or may have in the future, any requests, will
need a destroy request. Otherwise the server may not be able to
completely destroy a client object that has gone inert, since it has to
keep at least the wl_resource around to avoid killing the client on
unexpected but legal requests. Right?

A sort of beginnings of a "Wayland protocol design principles"
document, if you wish, or a check list.


More information about the wayland-devel mailing list