diff options
author | 2017-11-15 16:33:16 +0000 | |
---|---|---|
committer | 2017-11-27 17:58:20 +0000 | |
commit | 93652645f2fbd65c5b01cf32616d2dd1cbcd7af3 (patch) | |
tree | f53dc23301ee584efadf03c46ff2be9b55a4eaa8 /meta-agl/recipes-graphics/wayland/weston/0009-ivi-shell-added-libweston-desktop-api_implementation.patch | |
parent | 9cdd1e7b5678d426cadfb25f679a9216d50cfa61 (diff) |
Added XDG compatibility to ivi-shell
Backported M.Teyfel patch from wayland-devel mailing list:
https://lists.freedesktop.org/archives/wayland-devel/2017-November/035700.html
Upgrade wayland-ivi-extension to v2.0.2 but keep
using 1.1x for now with PREFERRED_VERSION until HMI could use the new
version.
Added Emre Ucan simple-id-agent to review.
Bug-AGL: SPEC-1096
Change-Id: I74c4ae0bf0bf822e27dcbb193dc9f7a13d3e270d
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Reviewed-on: https://gerrit.automotivelinux.org/gerrit/11991
Tested-by: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org>
ci-image-build: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org>
Reviewed-by: Nobuhiko Tanibata <nobuhiko_tanibata@denso.co.jp>
Reviewed-by: Tadao Tanikawa <tanikawa.tadao@jp.panasonic.com>
Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Diffstat (limited to 'meta-agl/recipes-graphics/wayland/weston/0009-ivi-shell-added-libweston-desktop-api_implementation.patch')
-rw-r--r-- | meta-agl/recipes-graphics/wayland/weston/0009-ivi-shell-added-libweston-desktop-api_implementation.patch | 166 |
1 files changed, 166 insertions, 0 deletions
diff --git a/meta-agl/recipes-graphics/wayland/weston/0009-ivi-shell-added-libweston-desktop-api_implementation.patch b/meta-agl/recipes-graphics/wayland/weston/0009-ivi-shell-added-libweston-desktop-api_implementation.patch new file mode 100644 index 000000000..6a72f15d8 --- /dev/null +++ b/meta-agl/recipes-graphics/wayland/weston/0009-ivi-shell-added-libweston-desktop-api_implementation.patch @@ -0,0 +1,166 @@ +index 84db2c97..e797e4f9 100644 +--- a/ivi-shell/ivi-shell.c ++++ b/ivi-shell/ivi-shell.c +@@ -489,6 +489,162 @@ shell_add_bindings(struct weston_compositor *compositor, + shell); + } + ++/* ++ * libweston-desktop ++ */ ++ ++static void ++desktop_surface_ping_timeout(struct weston_desktop_client *client, ++ void *user_data) ++{ ++ weston_log("ivi-shell: desktop_surface_ping_timeout is not supported\n"); ++} ++ ++static void ++desktop_surface_pong(struct weston_desktop_client *client, ++ void *user_data) ++{ ++ weston_log("ivi-shell: desktop_surface_pong is not supported\n"); ++} ++ ++static void ++desktop_surface_added(struct weston_desktop_surface *surface, ++ void *user_data) ++{ ++ struct ivi_shell *shell = (struct ivi_shell *) user_data; ++ struct ivi_layout_surface *layout_surface; ++ struct ivi_shell_surface *ivisurf; ++ struct weston_surface *weston_surf = ++ weston_desktop_surface_get_surface(surface); ++ ++ layout_surface = ivi_layout_desktop_surface_create(weston_surf, ++ IVI_INVALID_ID); ++ if (!layout_surface) { ++ return; ++ } ++ ++ layout_surface->weston_desktop_surface = surface; ++ ++ ivisurf = zalloc(sizeof *ivisurf); ++ if (!ivisurf) { ++ return; ++ } ++ ++ ivisurf->shell = shell; ++ ivisurf->id_surface = IVI_INVALID_ID; ++ ++ ivisurf->width = 0; ++ ivisurf->height = 0; ++ ivisurf->layout_surface = layout_surface; ++ ivisurf->surface = weston_surf; ++ ++ weston_desktop_surface_set_user_data(surface, ivisurf); ++} ++ ++static void ++desktop_surface_removed(struct weston_desktop_surface *surface, ++ void *user_data) ++{ ++ struct ivi_shell_surface *ivisurf = (struct ivi_shell_surface *) ++ weston_desktop_surface_get_user_data(surface); ++ ++ assert(ivisurf != NULL); ++ ++ if (ivisurf->layout_surface) ++ layout_surface_cleanup(ivisurf); ++} ++ ++static void ++desktop_surface_committed(struct weston_desktop_surface *surface, ++ int32_t sx, int32_t sy, void *user_data) ++{ ++ struct ivi_shell_surface *ivisurf = (struct ivi_shell_surface *) ++ weston_desktop_surface_get_user_data(surface); ++ struct weston_surface *weston_surf = ++ weston_desktop_surface_get_surface(surface); ++ ++ if(!ivisurf) ++ return; ++ ++ if (weston_surf->width == 0 || weston_surf->height == 0) ++ return; ++ ++ if (ivisurf->width != weston_surf->width || ++ ivisurf->height != weston_surf->height) { ++ ivisurf->width = weston_surf->width; ++ ivisurf->height = weston_surf->height; ++ ++ ivi_layout_desktop_surface_configure(ivisurf->layout_surface, ++ weston_surf->width, ++ weston_surf->height); ++ } ++} ++ ++static void ++desktop_surface_move(struct weston_desktop_surface *surface, ++ struct weston_seat *seat, uint32_t serial, void *user_data) ++{ ++ weston_log("ivi-shell: desktop_surface_move is not supported\n"); ++} ++ ++static void ++desktop_surface_resize(struct weston_desktop_surface *surface, ++ struct weston_seat *seat, uint32_t serial, ++ enum weston_desktop_surface_edge edges, void *user_data) ++{ ++ weston_log("ivi-shell: desktop_surface_resize is not supported\n"); ++} ++ ++static void ++desktop_surface_fullscreen_requested(struct weston_desktop_surface *surface, ++ bool fullscreen, ++ struct weston_output *output, ++ void *user_data) ++{ ++ weston_log("ivi-shell: desktop_surface_fullscreen_requested is not supported\n"); ++} ++ ++static void ++desktop_surface_maximized_requested(struct weston_desktop_surface *surface, ++ bool maximized, void *user_data) ++{ ++ weston_log("ivi-shell: desktop_surface_maximized_requested is not supported\n"); ++} ++ ++static void ++desktop_surface_minimized_requested(struct weston_desktop_surface *surface, ++ void *user_data) ++{ ++ weston_log("ivi-shell: desktop_surface_minimized_requested is not supported\n"); ++} ++ ++static void ++desktop_surface_set_xwayland_position(struct weston_desktop_surface *surface, ++ int32_t x, int32_t y, void *user_data) ++{ ++ weston_log("ivi-shell: desktop_surface_set_xwayland_position is not supported\n"); ++} ++ ++static const struct weston_desktop_api shell_desktop_api = { ++ .struct_size = sizeof(struct weston_desktop_api), ++ .ping_timeout = desktop_surface_ping_timeout, ++ .pong = desktop_surface_pong, ++ .surface_added = desktop_surface_added, ++ .surface_removed = desktop_surface_removed, ++ .committed = desktop_surface_committed, ++ ++ .move = desktop_surface_move, ++ .resize = desktop_surface_resize, ++ .fullscreen_requested = desktop_surface_fullscreen_requested, ++ .maximized_requested = desktop_surface_maximized_requested, ++ .minimized_requested = desktop_surface_minimized_requested, ++ .set_xwayland_position = desktop_surface_set_xwayland_position, ++}; ++ ++/* ++ * end of libweston-desktop ++ */ ++ + /* + * Initialization of ivi-shell. + */ |