summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>2014-07-07 21:19:53 +0900
committerNobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>2014-08-21 10:08:13 +0900
commit4a330d17e9c6b556172d49851967d00996654899 (patch)
treefadc7e05d1f32d5f1792e63895762f97e723152e
parent598beb0628470e6630d5eeaf6ce2164f3d35ed97 (diff)
downloadwayland-ivi-extension-4a330d17e9c6b556172d49851967d00996654899.tar.gz
weston-ivi-shell: Send content_state event from ivi-controller.
When content of ivi_surface is changes, e.g. map wl_surface or remove it, content_state is notified. Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>
-rwxr-xr-xweston-ivi-shell/src/ivi-controller.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/weston-ivi-shell/src/ivi-controller.c b/weston-ivi-shell/src/ivi-controller.c
index 49c61e6..e9c37a1 100755
--- a/weston-ivi-shell/src/ivi-controller.c
+++ b/weston-ivi-shell/src/ivi-controller.c
@@ -1553,6 +1553,7 @@ surface_event_create(struct ivi_layout_surface *layout_surface,
struct ivishell *shell = userdata;
struct ivisurface *ivisurf = NULL;
uint32_t id_surface = 0;
+ struct ivicontroller_surface *ctrlsurf = NULL;
id_surface = ivi_layout_getIdOfSurface(layout_surface);
@@ -1561,6 +1562,13 @@ surface_event_create(struct ivi_layout_surface *layout_surface,
weston_log("failed to create surface");
return;
}
+
+ wl_list_for_each(ctrlsurf, &shell->list_controller_surface, link) {
+ if (id_surface != ctrlsurf->id_surface) {
+ continue;
+ }
+ ivi_controller_surface_send_content(ctrlsurf->resource, IVI_CONTROLLER_SURFACE_CONTENT_STATE_CONTENT_AVAILABLE);
+ }
}
static void
@@ -1599,6 +1607,7 @@ surface_event_remove(struct ivi_layout_surface *layout_surface,
if (id_surface != ctrlsurf->id_surface) {
continue;
}
+ ivi_controller_surface_send_content(ctrlsurf->resource, IVI_CONTROLLER_SURFACE_CONTENT_STATE_CONTENT_REMOVED);
ivi_controller_surface_send_destroyed(ctrlsurf->resource);
}
}