<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">2013/5/15 Pekka Paalanen <span dir="ltr"><<a href="mailto:ppaalanen@gmail.com" target="_blank">ppaalanen@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div><div>On Wed, 15 May 2013 14:20:21 +0200<br>
Alexander Preisinger <<a href="mailto:alexander.preisinger@gmail.com" target="_blank">alexander.preisinger@gmail.com</a>> wrote:<br>
<br>
> Hello,<br>
><br>
> I thought a bit about it and like to present my ideas.<br>
> I mainly thought about it from the shell/compositor site when I like to<br>
> minimize, maximize surfaces from keybindings, like in some window managers.<br>
><br>
> For example the client can still request minimize, maximize, fullsrceen and<br>
> toplevel actions, but now the compositor responds with an state_update<br>
> event.<br>
> The compositor can also send this state_update when the compositor likes<br>
> change the window on it's own (like some task bar or compositor key<br>
> bindings).<br>
> The client can then save the state and act accordingly (like hiding same<br>
> menus if maximized or fullscreen).<br>
><br>
> diff --git a/protocol/wayland.xml b/protocol/wayland.xml<br>
> index 3bce022..e0f2c4a 100644<br>
> --- a/protocol/wayland.xml<br>
> +++ b/protocol/wayland.xml<br>
> @@ -811,6 +811,14 @@<br>
> <arg name="output" type="object" interface="wl_output"<br>
> allow-null="true"/><br>
> </request><br>
><br>
> + <request name="set_minimized"><br>
> + <description summary="minimize the surface"><br>
> + Minimize the surface.<br>
> +<br>
> + The compositor responds with state_update event.<br>
> + </description><br>
> + </request><br>
> +<br>
> <request name="set_title"><br>
> <description summary="set surface title"><br>
> Set a short title for the surface.<br>
> @@ -867,6 +875,30 @@<br>
> <arg name="height" type="int"/><br>
> </event><br>
><br>
> + <enum name="state"><br>
> + <description summary="different states for a surfaces"><br>
> + </description><br>
> + <entry name="toplevel" value="1" summary="surface is neither<br>
> maximized, minizized or fullscreen"/><br>
> + <entry name="maximized" value="2" summary="surface is maximized"/><br>
> + <entry name="minimized" value="3" summary="surface is minizimed"/><br>
> + <entry name="fullscreen" value="4" summary="surface is fullscreen"/><br>
> + </enum><br>
> +<br>
> + <event name="state_update"><br>
> + <description summary="update surface state"><br>
> + Tells the surface which state is has on the output.<br>
> +<br>
> + This event is sent in respons to set_maximized, set_minimized or<br>
> + set_fullscreen request to acknowledge the request. The client can<br>
> update it<br>
> + own state if it wants to keep track of it.<br>
> +<br>
> + The also compositor sends this event if itt wants the surface<br>
> minimized or<br>
> + maximized. For example by clicking on a task list item or compositor<br>
> key<br>
> + bindings for fullscreen.<br>
> + </description><br>
> + <arg name="state" type="uint" summary="new surface state"/><br>
> + </event><br>
> +<br>
> <event name="popup_done"><br>
> <description summary="popup interaction is done"><br>
> The popup_done event is sent out when a popup grab is broken,<br>
><br>
><br>
> I don't know about multiple window applications and maybe missed some other<br>
> use cases, but I hope this isn't too wrong of an idea. At least this should<br>
> hopefully not break the protocol too much.<br>
<br>
</div></div>If I understood right, here you have the client asking the compositor<br>
for permission, and then the compositor orders the client to be in a<br>
certain state and will compose it as such, regardless of what the client<br>
actually draws.<br>
<br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
This won't work, fixing the races it causes will complicate the<br>
protocol and cause roundtrips.<br>
<br>
The client draws its window, hence the client is in charge of how it<br>
looks, and the compositor cannot force that.<br>
<br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Hence, it must be compositor proposing to the client that it should<br>
e.g. maximize. It the client does that at some point, perhaps first<br>
sending a few new frames since it was animating, the client will tell<br>
the compositor it will now go maximized, and then the very next frame<br>
it draws will be maximized. This avoids flicker.<br>
<br></blockquote><div><br>Yes that seems logical. So the update_state should then be a request/suggest_state event?<br>It seems I am tainted by using tiling window managers, where they sometimes forces the size.<br> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Minimize is a little special, since the client does not need to react<br>
specially for it to look right. For everything else it will need to.<br>
Actually, if you think about a multi-window application, minimize needs<br>
to work the same way, so that application can hide all relevant<br>
windows (but maybe not *all* windows).<br>
<br></blockquote><div><br>My Idea is that the client gets notified per shell surface and the client can hide all windows<br>(for example we want to minimize the main window) or just the requested/proposed window.<br><br>
I will try get some basic implementation done, maybe I can reuse soreaus code for this.<br> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Deja vu, <br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
pq<br></blockquote><div><br><br>Thank you for your time<br><br>Best Regards.<br><br><br>Alexander Preisinger <br></div></div><br></div></div>