[PATCH] xdg-shell: Align surface life-time rules with that of wl_shell
Sjoerd Simons
sjoerd.simons at collabora.co.uk
Wed Aug 27 04:43:13 PDT 2014
On Sun, 2014-08-03 at 10:39 +0300, Pekka Paalanen wrote:
> On Mon, 21 Jul 2014 13:23:23 -0700
> Jason Ekstrand <jason at jlekstrand.net> wrote:
>
> > I think the way it's handled in subsurfaces allows you to create a
> > subsurface from a surface, delete the surface, and then re-use the surface
> > as something else. If I recall correctly, weston allows a fair amount of
> > surface re-use right now.
> >
> > That said, I'm not opposed to not allowing it for xdg surfaces, but I do
> > think they should still have an explicit destructor.
>
> Like I wrote in my recent blog post [1], not completely unrelated to
> this discussion in irc, IIRC, I strongly suggest adding destructor
> protocol unless you can prove that having destructor protocol is
> actively harmful.
Thanks for that post, as always quite enlightening :)
> As for wl_surface re-use after destroying a role, I have found that
> resetting a role to allow re-use is much easier and cleaner than
> not to, in Weston code. That's why I've been silently advocating to
> allow re-use, but at the same I don't really expect clients to use
> that. Yes, conflicting... so I suppose I don't have a real strong
> preference there. Removing a role loses all role-specific
> information, so whether the wl_surface get re-used or re-created
> does not make any difference.
So with your blogpost you've nicely managed to convince me that we
should keep the destroy request regardless of the semantics of it..
However, whether or not re-use is allowed should probably be made quite
explicit and especially in the case of weston enforced (if not). I'm
generally quite wary about having e.g. Weston be more permissive then
other compositors (e.g. mutter) as that is likely to just lead to
incompatibilities. If you continue that line of reasoning, it's probably
best to not allow it simply such that the odd clients that do use re-use
don't hit barely tested codepaths on compositors.
--
Sjoerd Simons <sjoerd.simons at collabora.co.uk>
Collabora Ltd.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 6170 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20140827/38dbed7b/attachment.bin>
More information about the wayland-devel
mailing list