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.
_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to