summaryrefslogtreecommitdiffstats
path: root/meta-agl/recipes-graphics/wayland/weston/0006-ivi-layout-introcuded-surface_create_and_configure.patch
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-11-15 16:33:16 +0000
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2017-11-27 17:58:20 +0000
commit93652645f2fbd65c5b01cf32616d2dd1cbcd7af3 (patch)
treef53dc23301ee584efadf03c46ff2be9b55a4eaa8 /meta-agl/recipes-graphics/wayland/weston/0006-ivi-layout-introcuded-surface_create_and_configure.patch
parent9cdd1e7b5678d426cadfb25f679a9216d50cfa61 (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/0006-ivi-layout-introcuded-surface_create_and_configure.patch')
-rw-r--r--meta-agl/recipes-graphics/wayland/weston/0006-ivi-layout-introcuded-surface_create_and_configure.patch117
1 files changed, 117 insertions, 0 deletions
diff --git a/meta-agl/recipes-graphics/wayland/weston/0006-ivi-layout-introcuded-surface_create_and_configure.patch b/meta-agl/recipes-graphics/wayland/weston/0006-ivi-layout-introcuded-surface_create_and_configure.patch
new file mode 100644
index 000000000..04461a1d4
--- /dev/null
+++ b/meta-agl/recipes-graphics/wayland/weston/0006-ivi-layout-introcuded-surface_create_and_configure.patch
@@ -0,0 +1,117 @@
+index 68ca68ba..c86cbb11 100644
+--- a/ivi-shell/ivi-layout-shell.h
++++ b/ivi-shell/ivi-layout-shell.h
+@@ -39,6 +39,14 @@ struct weston_view;
+ struct weston_surface;
+ struct ivi_layout_surface;
+
++void
++ivi_layout_desktop_surface_configure(struct ivi_layout_surface *ivisurf,
++ int32_t width, int32_t height);
++
++struct ivi_layout_surface*
++ivi_layout_desktop_surface_create(struct weston_surface *wl_surface,
++ uint32_t id_surface);
++
+ void
+ ivi_layout_surface_configure(struct ivi_layout_surface *ivisurf,
+ int32_t width, int32_t height);
+diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
+index 690af742..086d0fd2 100644
+--- a/ivi-shell/ivi-layout.c
++++ b/ivi-shell/ivi-layout.c
+@@ -1995,20 +1995,8 @@ ivi_layout_surface_dump(struct weston_surface *surface,
+ * methods of interaction between ivi-shell with ivi-layout
+ */
+
+-void
+-ivi_layout_surface_configure(struct ivi_layout_surface *ivisurf,
+- int32_t width, int32_t height)
+-{
+- struct ivi_layout *layout = get_instance();
+-
+- /* emit callback which is set by ivi-layout api user */
+- wl_signal_emit(&layout->surface_notification.configure_changed,
+- ivisurf);
+-}
+-
+-struct ivi_layout_surface*
+-ivi_layout_surface_create(struct weston_surface *wl_surface,
+- uint32_t id_surface)
++static struct ivi_layout_surface*
++surface_create(struct weston_surface *wl_surface, uint32_t id_surface)
+ {
+ struct ivi_layout *layout = get_instance();
+ struct ivi_layout_surface *ivisurf = NULL;
+@@ -2018,14 +2006,6 @@ ivi_layout_surface_create(struct weston_surface *wl_surface,
+ return NULL;
+ }
+
+- ivisurf = get_surface(&layout->surface_list, id_surface);
+- if (ivisurf != NULL) {
+- if (ivisurf->surface != NULL) {
+- weston_log("id_surface(%d) is already created\n", id_surface);
+- return NULL;
+- }
+- }
+-
+ ivisurf = calloc(1, sizeof *ivisurf);
+ if (ivisurf == NULL) {
+ weston_log("fails to allocate memory\n");
+@@ -2049,7 +2029,55 @@ ivi_layout_surface_create(struct weston_surface *wl_surface,
+
+ wl_list_insert(&layout->surface_list, &ivisurf->link);
+
+- wl_signal_emit(&layout->surface_notification.created, ivisurf);
++ return ivisurf;
++}
++
++void
++ivi_layout_desktop_surface_configure(struct ivi_layout_surface *ivisurf,
++ int32_t width, int32_t height)
++{
++ struct ivi_layout *layout = get_instance();
++
++ /* emit callback which is set by ivi-layout api user */
++ wl_signal_emit(&layout->surface_notification.configure_desktop_changed,
++ ivisurf);
++}
++
++struct ivi_layout_surface*
++ivi_layout_desktop_surface_create(struct weston_surface *wl_surface,
++ uint32_t id_surface)
++{
++ return surface_create(wl_surface, id_surface);
++}
++
++void
++ivi_layout_surface_configure(struct ivi_layout_surface *ivisurf,
++ int32_t width, int32_t height)
++{
++ struct ivi_layout *layout = get_instance();
++
++ /* emit callback which is set by ivi-layout api user */
++ wl_signal_emit(&layout->surface_notification.configure_changed,
++ ivisurf);
++}
++
++struct ivi_layout_surface*
++ivi_layout_surface_create(struct weston_surface *wl_surface,
++ uint32_t id_surface)
++{
++ struct ivi_layout *layout = get_instance();
++ struct ivi_layout_surface *ivisurf = NULL;
++
++ ivisurf = get_surface(&layout->surface_list, id_surface);
++ if (ivisurf) {
++ weston_log("id_surface(%d) is already created\n", id_surface);
++ return NULL;
++ }
++
++ ivisurf = surface_create(wl_surface, id_surface);
++
++ if (ivisurf)
++ wl_signal_emit(&layout->surface_notification.created, ivisurf);
+
+ return ivisurf;
+ }