diff options
Diffstat (limited to 'meta-agl-profile-graphical/recipes-graphics/wayland/weston/0017-ivi-shell-register-ivi_layout_interface.patch')
-rw-r--r-- | meta-agl-profile-graphical/recipes-graphics/wayland/weston/0017-ivi-shell-register-ivi_layout_interface.patch | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0017-ivi-shell-register-ivi_layout_interface.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0017-ivi-shell-register-ivi_layout_interface.patch new file mode 100644 index 000000000..87d883c02 --- /dev/null +++ b/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0017-ivi-shell-register-ivi_layout_interface.patch @@ -0,0 +1,91 @@ +From 5b1d282c7a7d2badf74bb19f9ddc0d49d3d4562b Mon Sep 17 00:00:00 2001 +From: Emre Ucan <eucan@de.adit-jv.com> +Date: Thu, 25 Jan 2018 14:36:10 +0100 +Subject: [PATCH] ivi-shell: register ivi_layout_interface + +Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> +Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> +--- + ivi-shell/ivi-layout-export.h | 13 +++++++++++++ + ivi-shell/ivi-layout.c | 6 ++++++ + ivi-shell/ivi-shell.c | 2 -- + 3 files changed, 19 insertions(+), 2 deletions(-) + +diff --git a/ivi-shell/ivi-layout-export.h b/ivi-shell/ivi-layout-export.h +index 2317d6e..9452691 100644 +--- a/ivi-shell/ivi-layout-export.h ++++ b/ivi-shell/ivi-layout-export.h +@@ -59,6 +59,7 @@ extern "C" { + + #include "stdbool.h" + #include "compositor.h" ++#include "plugin-registry.h" + + #define IVI_SUCCEEDED (0) + #define IVI_FAILED (-1) +@@ -140,6 +141,8 @@ enum ivi_layout_transition_type{ + IVI_LAYOUT_TRANSITION_MAX, + }; + ++#define IVI_LAYOUT_API_NAME "ivi_layout_api_v1" ++ + struct ivi_layout_interface { + + /** +@@ -580,6 +583,16 @@ struct ivi_layout_interface { + (*get_surface)(struct weston_surface *surface); + }; + ++static inline const struct ivi_layout_interface * ++ivi_layout_get_api(struct weston_compositor *compositor) ++{ ++ const void *api; ++ api = weston_plugin_api_get(compositor, IVI_LAYOUT_API_NAME, ++ sizeof(struct ivi_layout_interface)); ++ ++ return (const struct ivi_layout_interface *)api; ++} ++ + #ifdef __cplusplus + } + #endif /* __cplusplus */ +diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c +index 64e4ead..c2c1a35 100644 +--- a/ivi-shell/ivi-layout.c ++++ b/ivi-shell/ivi-layout.c +@@ -2000,6 +2000,8 @@ ivi_layout_surface_create(struct weston_surface *wl_surface, + return ivisurf; + } + ++static struct ivi_layout_interface ivi_layout_interface; ++ + void + ivi_layout_init_with_compositor(struct weston_compositor *ec) + { +@@ -2028,6 +2030,10 @@ ivi_layout_init_with_compositor(struct weston_compositor *ec) + + layout->transitions = ivi_layout_transition_set_create(ec); + wl_list_init(&layout->pending_transition_list); ++ ++ weston_plugin_api_register(ec, IVI_LAYOUT_API_NAME, ++ &ivi_layout_interface, ++ sizeof(struct ivi_layout_interface)); + } + + static struct ivi_layout_interface ivi_layout_interface = { +diff --git a/ivi-shell/ivi-shell.c b/ivi-shell/ivi-shell.c +index 67619b8..2dabdf9 100644 +--- a/ivi-shell/ivi-shell.c ++++ b/ivi-shell/ivi-shell.c +@@ -425,8 +425,6 @@ ivi_shell_setting_create(struct ivi_shell_setting *dest, + if (!dest->ivi_module && + weston_config_section_get_string(section, "ivi-module", + &dest->ivi_module, NULL) < 0) { +- weston_log("Error: ivi-shell: No ivi-module set\n"); +- result = -1; + } + + weston_config_section_get_bool(section, "developermode", +-- +2.7.4 + |