+
+static void
+shell_advertise_app_state(struct ivi_compositor *ivi, const char *app_id,
+ const char *data, uint32_t app_state)
+{
+ struct desktop_client *dclient;
+ uint32_t app_role;
+ struct ivi_surface *surf = ivi_find_app(ivi, app_id);
+
+ /* FIXME: should queue it here and see when binding agl-shell-desktop
+ * if there are any to be sent */
+ if (!surf)
+ return;
+
+ app_role = surf->role;
+ if (app_role == IVI_SURFACE_ROLE_POPUP)
+ app_role = AGL_SHELL_DESKTOP_APP_ROLE_POPUP;
+
+ wl_list_for_each(dclient, &ivi->desktop_clients, link)
+ agl_shell_desktop_send_state_app(dclient->resource, app_id,
+ data, app_state, app_role);
+}
+