[PATCH v3] activate toplevel fullscreen and menu surfaces

Kristian Høgsberg krh at bitplanet.net
Thu Dec 15 08:53:31 PST 2011


On Fri, Dec 9, 2011 at 5:58 AM,  <juan.j.zhao at linux.intel.com> wrote:
> From: Juan Zhao <juan.j.zhao at linux.intel.com>
>
> Activate the toplevel, fullscrren and menu surfaces during mapping,
> so that the launched applications can get the keyboard focus without
> clicking on that window.

Yup, thanks.  I rewrote it a bit to better match the
switch(surface_type) style in map().

Kristian

>  compositor/shell.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/compositor/shell.c b/compositor/shell.c
> index 22004f9..5cd8637 100644
> --- a/compositor/shell.c
> +++ b/compositor/shell.c
> @@ -835,6 +835,12 @@ map(struct wlsc_shell *base,
>                surface->y = 10 + random() % 400;
>        }
>
> +       if ((surface_type == SHELL_SURFACE_TOPLEVEL ||
> +           surface_type == SHELL_SURFACE_TRANSIENT ||
> +           surface_type == SHELL_SURFACE_FULLSCREEN) && !shell->locked) {
> +               activate(base, surface, compositor->input_device, wlsc_compositor_get_time());
> +       }
> +
>        surface->width = width;
>        surface->height = height;
>        if (!shell->locked || surface_type == SHELL_SURFACE_LOCK)
> --
> 1.7.2.2
>


More information about the wayland-devel mailing list