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-10-28 12:16:55 +0900
commit498ce7bbf5771b433d0683b952f13091509228d0 (patch)
treeada66b7fedfecaf3bd32fe1ef9fdbeea0dfd3598
parent87b6df7a327501334bab0d209c6c1ea7bb40c712 (diff)
downloadweston-498ce7bbf5771b433d0683b952f13091509228d0.tar.gz
window.c: support ivi_surface configure event.
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 684f98eb..99460b8f 100644
--- a/clients/window.c
+++ b/clients/window.c
@@ -1374,6 +1374,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;
@@ -1390,6 +1404,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);
}
}