summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>2014-09-16 15:40:25 +0900
committerNobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>2014-09-22 17:24:46 +0900
commit1d5fe5b2bdb9c62903baec6f38ada60f4065c16f (patch)
tree720589ca132ed980d28eb55f9a4e7a93358130ff
parentf26fc720fa6107e74d85db29d6930e983416bf36 (diff)
downloadweston-baserock/jonathanmaw/genivi-demo-jetson.tar.gz
window.c: support ivi_surface configure event.baserock/jonathanmaw/genivi-demo-jetson
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-rw-r--r--clients/window.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/clients/window.c b/clients/window.c
index 5704c0cc..cb3ef48c 100644
--- a/clients/window.c
+++ b/clients/window.c
@@ -1385,6 +1385,20 @@ window_get_display(struct window *window)
}
static void
+handle_ivi_surface_configure(void *data, struct ivi_surface *ivi_surface,
+ int32_t width, int32_t height)
+{
+ struct window *window = data;
+
+ window_schedule_resize(window, width, height);
+}
+
+static const struct ivi_surface_listener ivi_surface_listener = {
+ NULL,
+ handle_ivi_surface_configure,
+};
+
+static void
surface_create_surface(struct surface *surface, uint32_t flags)
{
struct display *display = surface->window->display;
@@ -1401,6 +1415,9 @@ surface_create_surface(struct surface *surface, uint32_t flags)
fprintf(stderr, "Failed to create ivi_client_surface\n");
abort();
}
+
+ ivi_surface_add_listener(surface->window->ivi_surface,
+ &ivi_surface_listener, surface->window);
}
}