diff options
author | Emre Ucan <eucan@de.adit-jv.com> | 2015-07-07 14:50:11 +0200 |
---|---|---|
committer | Nobuhiko Tanibata <nobuhiko_tanibata@xddp.denso.co.jp> | 2015-07-08 08:34:03 +0900 |
commit | 1648de27aa66c3dd6650ac63141ef13b90afe32b (patch) | |
tree | b195cebf2f64a18f3006a80f58833f86b65246d1 /weston-ivi-shell | |
parent | 119cfaff79ca4f89467e9fac9888b1bc6b9143af (diff) | |
download | wayland-ivi-extension-1648de27aa66c3dd6650ac63141ef13b90afe32b.tar.gz |
ivi-controller: add surface_configure_event to send_surface_event
surface_configure_event sends the ivi_controller_surface_send_configuration
event with original dimensions of the wayland-buffer of a surface.
Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
Diffstat (limited to 'weston-ivi-shell')
-rw-r--r-- | weston-ivi-shell/src/ivi-controller-impl.c | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/weston-ivi-shell/src/ivi-controller-impl.c b/weston-ivi-shell/src/ivi-controller-impl.c index 23a70a4..b92b4ce 100644 --- a/weston-ivi-shell/src/ivi-controller-impl.c +++ b/weston-ivi-shell/src/ivi-controller-impl.c @@ -369,6 +369,30 @@ send_surface_add_event(struct ivisurface *ivisurf, } static void +send_surface_configure_event(struct ivisurface *ivisurf, + struct wl_resource *resource) +{ + struct weston_surface *surface; + struct ivi_layout_surface* layout_surface; + struct ivishell* shell; + + layout_surface = ivisurf->layout_surface; + shell = ivisurf->shell; + + surface = ivi_extension_surface_get_weston_surface(shell, layout_surface); + + if (!surface) + return; + + if ((surface->width == 0) || (surface->height == 0)) + return; + + ivi_controller_surface_send_configuration(resource, + surface->width, + surface->height); +} + +static void send_surface_event(struct wl_resource *resource, struct ivisurface *ivisurf, const struct ivi_layout_surface_properties *prop, @@ -402,6 +426,9 @@ send_surface_event(struct wl_resource *resource, if (mask & IVI_NOTIFICATION_ADD) { send_surface_add_event(ivisurf, resource, IVI_NOTIFICATION_ADD); } + if (mask & IVI_NOTIFICATION_CONFIGURE) { + send_surface_configure_event(ivisurf, resource); + } } static void @@ -1630,7 +1657,7 @@ surface_event_configure(struct ivi_layout_surface *layout_surface, continue; } send_surface_event(ctrlsurf->resource, ivisurf, - prop, IVI_NOTIFICATION_ALL); + prop, IVI_NOTIFICATION_CONFIGURE); } } |