[PATCH wayland v4 1/5] protocol: define the concept of wl_surface role
Bill Spitzak
spitzak at gmail.com
Thu Aug 21 16:18:32 PDT 2014
On 08/21/2014 02:52 AM, Pekka Paalanen wrote:
> + Destroying the role object does not remove the role from the
> + wl_surface, but it may stop the wl_surface from "playing the role".
> + For instance, if a wl_subsurface object is destroyed, the wl_surface
> + it was created for will be unmapped and forget its position and
> + z-order. It is allowed to create a wl_subsurface for the same
> + wl_surface again...
I really think destroying the role object should have no visible effect.
This is inconsistent with roles that don't create a role object. They
have zero role objects too, but somehow the role keeps working.
It is also inconsistent with the ability to create more than one copy of
the role object. For some reason destruction of the last one is
different than destruction of all the others...
May also be really nasty if a former object-less role is updated with a
new api that returns a role object. Now all users of that role have to
be updated to store this object they didn't use to need so it won't get
deleted...
A client subroutine that uses a role the caller does not know about will
have to use a static map to look up cached role objects by wl_surface
id. And some scheme has to be figured out to delete them when the
wl_surface is deleted.
It also just seems like it would be easier to implement the compositor
this way, too.
More information about the wayland-devel
mailing list