[PATCH wayland v2] protocol: define the concept of wl_surface role
Bill Spitzak
spitzak at gmail.com
Tue Aug 19 13:04:54 PDT 2014
On 08/19/2014 12:29 AM, Pekka Paalanen wrote:
> + Often, this
> + request also creates a new protocol object that represents the
> + role and adds additional functionality to wl_surface. When a
> + client wants to destroy a wl_surface, they must destroy this 'role
> + object' before the wl_surface.
Destroying the last protocol object for the role does not remove the
role, correct? The client can recreate a new protocol object for that
role and it still works?
> + Losing a role means losing all the role-specific state.
I'm not sure what you are saying here. I think maybe you are talking
about a surface that was used for drag & drop when the drag & drop ends?
I thought in that case the surface must be destroyed: ie once a surface
"loses a role" it cannot be assigned any role, including the same one.
But in that case the "state" is irrelevant.
Are you allowed to reuse the drag & drop surface for another drag &
drop? If the creation request also sets some state it is obvious that
portion of the state is not preserved. But it seems a lot easier on both
clients and compositors if other state is allowed to be preserved.
In any case I find this sentence really confusing. Also it might help if
there was a concrete example of a surface "losing a role".
More information about the wayland-devel
mailing list