diff options
author | Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp> | 2014-09-10 13:57:10 +0900 |
---|---|---|
committer | Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp> | 2014-10-28 12:16:55 +0900 |
commit | 64fe67d9da09d2865dce1a05bd6ae7395b131a80 (patch) | |
tree | 746e3fc374b5c156ac783ea829cbce1e4a45f57b | |
parent | 1f79dfc334418b95f82afac528d70cc5749cf2ef (diff) | |
download | weston-64fe67d9da09d2865dce1a05bd6ae7395b131a80.tar.gz |
DEBUG: simple-egl receive configure event and resize buffer.
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-rw-r--r-- | clients/simple-egl.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/clients/simple-egl.c b/clients/simple-egl.c index 92f2dc28..d752614f 100644 --- a/clients/simple-egl.c +++ b/clients/simple-egl.c @@ -335,6 +335,26 @@ static const struct xdg_surface_listener xdg_surface_listener = { }; static void +handle_ivi_surface_configure(void *data, struct ivi_surface *ivi_surface, + int32_t width, int32_t height) +{ + struct window *window = data; + + wl_egl_window_resize(window->native, width, height, 0, 0); + + window->geometry.width = width; + window->geometry.height = height; + + if (!window->fullscreen) + window->window_size = window->geometry; +} + +static const struct ivi_surface_listener ivi_surface_listener = { + NULL, + handle_ivi_surface_configure, +}; + +static void create_surface(struct window *window) { struct display *display = window->display; @@ -370,6 +390,10 @@ create_surface(struct window *window) fprintf(stderr, "Failed to create ivi_client_surface\n"); abort(); } + + ivi_surface_add_listener(window->ivi_surface, + &ivi_surface_listener, window); + } else { assert(0); } |