<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jul 29, 2014 at 12:16 PM, Bill Spitzak <span dir="ltr"><<a href="mailto:spitzak@gmail.com" target="_blank">spitzak@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On 07/29/2014 11:40 AM, Manuel Bachmann wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
When creating a xdg_surface, the surface will not be mapped (i.e. shown)<br>
by desktop-shell anymore. It will only be if xdg_surface_present() has<br>
been called once.<br>
</blockquote>
<br></div>
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.<br>
</blockquote><div><br></div><div>That's the way it has worked in the past.  There's nothing requiring this behavior in xdg_shell as we haven't stabilized it fully yet.  Really, it doesn't matter whether the client has to call an additional request beyond just creating the xdg_surface.<br>
<br></div><div>Another question for Manuel: Does present() interact with the surface commit?  Should it?<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
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.<div><br></div>
</blockquote><div><br></div><div>True.  We shouldn't claim to guarantee any "window showing up behavior" on the first or subsequent calls.<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="">
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
If called twice, or more, the request will send an event to<br>
desktop-shell, so it can display a notification.<br>
</blockquote>
<br></div>
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.<br>

<br></blockquote><div><br></div><div>Yes, talking about it in terms of a count is a bad plan.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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.<br>
</blockquote><div><br></div><div>We also discussed the name "attention".  The reason why we didn't go with "raise" or "show" is that it implies a specific action on the part of the compositor, namely showing the user the window.  The term "activate" is used for something else in xdg_shell so that one's out too.<br>
<br></div><div>--Jason Ekstrand<br></div><div><br></div></div></div></div>