[PATCH weston] xdg-shell: handle clients launched in fullscreen

Pier Luigi Fiorini pierluigi.fiorini at gmail.com
Tue Sep 2 02:27:27 PDT 2014


2014-09-02 11:11 GMT+02:00 Marek Chalupa <mchqwerty at gmail.com>:

[cut]

>  desktop-shell/shell.c | 33 +++++++++++++++++++++++++++++++++
>  1 file changed, 33 insertions(+)
>
> diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
> index 9c0e721..cc7fb4a 100644
> --- a/desktop-shell/shell.c
> +++ b/desktop-shell/shell.c
> @@ -3584,6 +3584,32 @@ xdg_surface_unset_maximized(struct wl_client *client,
>         send_configure_for_surface(shsurf);
>  }
>
> +static struct weston_output *
> +get_focused_output(struct weston_compositor *compositor)
> +{
> +       struct weston_seat *seat;
> +       struct weston_output *output = NULL;
> +
> +       wl_list_for_each(seat, &compositor->seat_list, link) {
> +               /* Priority has touch focus, then pointer and
> +                * then keyboard focus. We should probably have
> +                * three for loops and check frist for touch,
> +                * then for pointer, etc. but unless somebody has some
> +                * objections, I think this is sufficient. */
> +               if (seat->touch && seat->touch->focus)
> +                       output = seat->pointer->focus->output;

This should probably be seat->touch->focus->output

> +               else if (seat->pointer && seat->pointer->focus)
> +                       output = seat->pointer->focus->output;
> +               else if (seat->keyboard && seat->keyboard->focus)
> +                       output = seat->keyboard->focus->output;
> +
> +               if (output)
> +                       break;
> +       }
> +
> +       return output;
> +}
> +

[cut]

-- 
Out of the box experience
http://www.maui-project.org/


More information about the wayland-devel mailing list