[PATCH weston 2/5] ivi-shell: add input panel label func

Eugen Friedrich friedrix at gmail.com
Thu Mar 24 10:26:31 UTC 2016


2016-03-22 15:48 GMT+01:00 Pekka Paalanen <ppaalanen at gmail.com>:

> From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
>
> Copied from desktop-shell/input-panel.c, add a label function for the
> input panel.
>
> This patch strictly reduces the difference between input-panel.c and
> input-panel-ivi.c.
>
> Signed-off-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
> ---
>  ivi-shell/input-panel-ivi.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/ivi-shell/input-panel-ivi.c b/ivi-shell/input-panel-ivi.c
> index 721d31c..581b56b 100644
> --- a/ivi-shell/input-panel-ivi.c
> +++ b/ivi-shell/input-panel-ivi.c
> @@ -157,6 +157,12 @@ update_input_panels(struct wl_listener *listener,
> void *data)
>         memcpy(&shell->text_input.cursor_rectangle, data,
> sizeof(pixman_box32_t));
>  }
>
> +static int
> +input_panel_get_label(struct weston_surface *surface, char *buf, size_t
> len)
> +{
> +       return snprintf(buf, len, "input panel");
> +}
> +
>  static void
>  input_panel_configure(struct weston_surface *surface, int32_t sx, int32_t
> sy)
>  {
> @@ -194,6 +200,7 @@ destroy_input_panel_surface(struct input_panel_surface
> *input_panel_surface)
>         wl_list_remove(&input_panel_surface->link);
>
>         input_panel_surface->surface->configure = NULL;
> +       weston_surface_set_label_func(input_panel_surface->surface, NULL);
>         weston_view_destroy(input_panel_surface->view);
>
>         free(input_panel_surface);
> @@ -235,6 +242,7 @@ create_input_panel_surface(struct ivi_shell *shell,
>
>         surface->configure = input_panel_configure;
>         surface->configure_private = input_panel_surface;
> +       weston_surface_set_label_func(surface, input_panel_get_label);
>
>         input_panel_surface->shell = shell;
>
> --
> 2.7.3
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel
>
Looks good
Reviewed-by: Eugen Friedrich <friedrix at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20160324/f0c97ce5/attachment.html>


More information about the wayland-devel mailing list