+static void
+shell_desktop_activate_app(struct wl_client *client,
+ struct wl_resource *shell_res,
+ const char *app_id, const char *data,
+ struct wl_resource *output_res)
+{
+ struct weston_head *head = weston_head_from_resource(output_res);
+ struct weston_output *woutput = weston_head_get_output(head);
+ struct ivi_output *output = to_ivi_output(woutput);
+
+ ivi_layout_activate(output, app_id);
+ shell_advertise_app_state(output->ivi, app_id,
+ data, AGL_SHELL_DESKTOP_APP_STATE_ACTIVATED);
+}
+
+static void
+shell_deactivate_app(struct wl_client *client,
+ struct wl_resource *shell_res,
+ const char *app_id)
+{
+ struct desktop_client *dclient = wl_resource_get_user_data(shell_res);
+ struct ivi_compositor *ivi = dclient->ivi;
+
+ ivi_layout_deactivate(ivi, app_id);
+ shell_advertise_app_state(ivi, app_id,
+ NULL, AGL_SHELL_DESKTOP_APP_STATE_DEACTIVATED);
+}
+