RFC : xdg_surface_present() look-and-feel and implementation
Manuel Bachmann
manuel.bachmann at open.eurogiciel.org
Tue Jul 29 14:51:54 PDT 2014
Hi Bill,
"This is not controlled by a count, but by whether a window is already
visible or already in the notification state. Clients should be able to
send a lot of these in a row. They cannot reliably test if they are
invisible and send the request only then, as there is a race condition."
Thanks a lot for that ; your remark made me find a bug in my
implementation, effectively when a surface was shown via a notification
(i.e. tooltip), subsequent present() request would not re-create the
notification. This is bad.
Now fixed here :
https://github.com/Tarnyko/weston-xdg_surface_present/commit/4265ab36f644d2663bf14d4b0d42fb8bcb6ca6f7
Regards,
2014-07-29 21:16 GMT+02:00 Bill Spitzak <spitzak at gmail.com>:
> On 07/29/2014 11:40 AM, Manuel Bachmann wrote:
>
> When creating a xdg_surface, the surface will not be mapped (i.e. shown)
>> by desktop-shell anymore. It will only be if xdg_surface_present() has
>> been called once.
>>
>
> There seems to be a design goal in Wayland to prevent clients from making
> surfaces that they never map. So it would be better if creation + commit of
> a surface did the same thing as present. Also this does not break existing
> clients.
>
> There is nothing special about the first time the surface wants attention
> (other than historical legacy). The desktop should be allowed to turn this
> into a notification just like it would on subsequent calls.
>
>
> If called twice, or more, the request will send an event to
>> desktop-shell, so it can display a notification.
>>
>
> This is not controlled by a count, but by whether a window is already
> visible or already in the notification state. Clients should be able to
> send a lot of these in a row. They cannot reliably test if they are
> invisible and send the request only then, as there is a race condition.
>
> I also think the term "present" is not a great idea. This should be
> exactly the same as "raise" or "show" or "activate" or any number of other
> terms, but I have never seen the word "present" used before. I would reuse
> an existing term. One reason is to prevent somebody else from adding a
> redundant api for that term, because they did not realize "present" is the
> thing they are looking for.
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
>
--
Regards,
*Manuel BACHMANN Tizen Project VANNES-FR*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20140729/1caf9bae/attachment-0001.html>
More information about the wayland-devel
mailing list