[PATCH wayland v4 1/5] protocol: define the concept of wl_surface role

Jasper St. Pierre jstpierre at mecheye.net
Thu Aug 21 16:30:07 PDT 2014


On Thu, Aug 21, 2014 at 7:18 PM, Bill Spitzak <spitzak at gmail.com> wrote:

>
>
> 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...
>

How do you create more than one copy of the role object in the first place?


> 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...
>

Methods don't return parameters. Clients allocate new object IDs and then
pass those to the server. You cannot add new API that returns a role object
without breaking API in the first place, since it's modifying the number of
parameters of the method.


> 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.
>

That doesn't make any sense. What kind of client subroutine are you talking
about?


> It also just seems like it would be easier to implement the compositor
> this way, too.
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
>



-- 
  Jasper
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20140821/e14bb334/attachment.html>


More information about the wayland-devel mailing list