[PATCH] wl_shell: Add surface state changed event
Mikko Levonmaa
mikko.levonmaa at gmail.com
Wed May 15 11:37:19 PDT 2013
On Wed, May 15, 2013 at 12:12:43PM -0500, Jason Ekstrand wrote:
> On Wed, May 15, 2013 at 9:39 AM, Mikko Levonmaa <mikko.levonmaa at gmail.com>
> wrote:
>
> This allows the shell to inform the surface that it has changed
> state, current supported states are default, minimized, maximized
> and fullscreen. The shell implementation is free to interpret the
> meaning for the state, i.e. the minimized might not always mean
> that the surface is fully hidden for example.
>
>
> We cannot simply have the shell telling clients it changed their state. The
> clients need to be in control of the state of each surface. This is because
> minimizing a client (for example) might not be as simple as hiding a specific
> window. Only the client can actually know how to minimize/maximize it.
Hmm... not sure I fully understand nor agree (perhaps lack of
understanding;). So to me it seems that the compositor should be the
driver, not the passenger, i.e. it know how to animate the surface when
it gets minimized and when maximied. How would the client know this?
Also wouldn't this imply more knowledge on the toolkits side as well?
> Please read earlier min/max discussions or yesterday's IRC logs for more
> details.
Neato, seems to be a hot topic, good to see someone else looking into
this as well. I read through the email and pq's commmets about avoiding flicker
make sense, so having the compositor and the client be in sync about whats
going on is needed. Also naturally the client can be the originator, so
clearly a request is needed. However in some cases the request might not be
honored by the compositor, especially in an embedded environment. And
actually also the compositor might only show window only in certain
state, i.e. fullscreen so having the client full to decline a request
might not be good either.
>
>
> Signed-off-by: Mikko Levonmaa <mikko.levonmaa at lge.com>
> ---
> protocol/wayland.xml | 15 +++++++++++++++
> 1 files changed, 15 insertions(+), 0 deletions(-)
>
> diff --git a/protocol/wayland.xml b/protocol/wayland.xml
> index 3bce022..ee7d32d 100644
> --- a/protocol/wayland.xml
> +++ b/protocol/wayland.xml
> @@ -874,6 +874,21 @@
> to the client owning the popup surface.
> </description>
> </event>
> +
> + <enum name="state">
> + <entry name="default" value="0"/>
> + <entry name="minimized" value="1"/>
> + <entry name="maximized" value="2"/>
> + <entry name="fullscreen" value="4"/>
> + </enum>
> +
> + <event name="state_changed">
> + <description summary="The surface state was changed">
> + The compositor or the user has taken action that has resulted in
> + this surface to change state.
> + </description>
> + <arg name="state" type="uint"/>
> + </event>
> </interface>
>
> <interface name="wl_surface" version="2">
> --
> 1.7.4.1
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
>
>
More information about the wayland-devel
mailing list