summaryrefslogtreecommitdiff
path: root/ivi-shell/hmi-controller.c
diff options
context:
space:
mode:
authorUcan, Emre (ADITG/SW1) <eucan@de.adit-jv.com>2016-06-17 13:50:16 +0000
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>2016-06-29 11:31:51 +0300
commitd97f10081e5d34550276132128addf181a4de35b (patch)
tree7260259deb8f0c27e395efce9dc85de672a40c83 /ivi-shell/hmi-controller.c
parent28d240f2819fdace6d70bff055ff75425a426783 (diff)
ivi-shell: add surface_created listener after launchers
Add surface_created listener after the initialization of launchers. Otherwise, surfaces of the launchers will be added to the application layer too. This does create a race where we might miss some surfaces that get created before the UI client signals ready, but it was agreed the race is not significant. You cannot use the launchers before the UI is ready, and someone using systemd integration to launch clients in parallel to Weston with ivi-shell and hmi-controller is unlikely. After all, hmi-controller is just a demo. Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> [Pekka: added extra commit message notes] Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Diffstat (limited to 'ivi-shell/hmi-controller.c')
-rw-r--r--ivi-shell/hmi-controller.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/ivi-shell/hmi-controller.c b/ivi-shell/hmi-controller.c
index 548d68f9..0c28e817 100644
--- a/ivi-shell/hmi-controller.c
+++ b/ivi-shell/hmi-controller.c
@@ -845,9 +845,6 @@ hmi_controller_create(struct weston_compositor *ec)
wl_list_insert(&hmi_ctrl->workspace_fade.layer_list,
&tmp_link_layer->link);
- hmi_ctrl->surface_created.notify = set_notification_create_surface;
- ivi_layout_interface->add_listener_create_surface(&hmi_ctrl->surface_created);
-
hmi_ctrl->surface_removed.notify = set_notification_remove_surface;
ivi_layout_interface->add_listener_remove_surface(&hmi_ctrl->surface_removed);
@@ -1277,6 +1274,13 @@ ivi_hmi_controller_UI_ready(struct wl_client *client,
ivi_layout_interface->commit_changes();
ivi_hmi_controller_add_launchers(hmi_ctrl, 256);
+
+ /* Add surface_created listener after the initialization of launchers.
+ * Otherwise, surfaces of the launchers will be added to application
+ * layer too.*/
+ hmi_ctrl->surface_created.notify = set_notification_create_surface;
+ ivi_layout_interface->add_listener_create_surface(&hmi_ctrl->surface_created);
+
hmi_ctrl->is_initialized = 1;
}