[PATCH wayland v2] protocol: define the concept of wl_surface role

Jason Ekstrand jason at jlekstrand.net
Wed Aug 20 15:30:25 PDT 2014


On Wed, Aug 20, 2014 at 12:52 PM, Bill Spitzak <spitzak at gmail.com> wrote:

>
>
> On 08/20/2014 03:06 AM, Pekka Paalanen wrote:
>
>> On Tue, 19 Aug 2014 13:04:54 -0700
>> Bill Spitzak <spitzak at gmail.com> wrote:
>>
>
>  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?
>>>
>>
>> Recreating the same role works, because that is kind of required with
>> cursors and drag icons.
>>
>
> Yes I think my questions were also asked and answered (mostly) in another
> thread of this email. It sounds like "removing a role" is not actually
> something that happens.
>
> I feel that destroying the role object should not have any effect. So
> destroying the xdg_shell_surface would not change how the surface is
> displayed. The client could create a new xdg_shell_surface object and
> continue manipulating the surface with it.
>
> The reason is that it seems very inconsistent with the ability to create
> more than one instance of the same role object. Now destroying all except
> the last one has no effect, but destroying the last one does?


For wl_shell_surface, wl_subsurface, and xdg_surface, you can only have one
role object per wl_surface.  I think we're pretty consistent about this.
Other roles such as wl_pointer.set_cursor don't involve an object so it's
not really an issue.  There is the question of whether you should be
allowed to use the same surface for multple cursors but weston allows this,
but (from my experience app-writing) doesn't make sense for the app to do
since it needs to be able to respond to movement events with different
cursor images per pointer.

--Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20140820/0303d959/attachment.html>


More information about the wayland-devel mailing list