app_id,
ivi_layout_get_surface_role_name(surf), output->name);
- if (wl_resource_get_version(ivi->shell_client.resource) >= AGL_SHELL_APP_STATE_SINCE_VERSION)
- agl_shell_send_app_state(ivi->shell_client.resource,
- app_id, AGL_SHELL_APP_STATE_ACTIVATED);
+ shell_send_app_state(ivi, app_id, AGL_SHELL_APP_STATE_ACTIVATED);
+}
+
+static bool
+ivi_layout_find_output_with_app_id(const char *app_id, struct ivi_output *output)
+{
+ char *cur;
+ size_t app_id_len;
+
+ cur = output->app_ids;
+ app_id_len = strlen(app_id);
+ while ((cur = strstr(cur, app_id))) {
+ if ((cur[app_id_len] == ',' || cur[app_id_len] == '\0') &&
+ (cur == output->app_ids || cur[-1] == ','))
+ return true;
+ cur++;
+ }
+
+ return false;
}
struct ivi_output *
return NULL;
wl_list_for_each(out, &ivi->outputs, link) {
- if (!out->app_id)
+ if (!out->app_ids)
continue;
- if (!strcmp(app_id, out->app_id))
+ if (ivi_layout_find_output_with_app_id(app_id, out))
return out;
}
-
return NULL;
}
if (surf->hidden_layer_output &&
surf->hidden_layer_output != ivi_output) {
weston_layer_entry_remove(&ev->layer_link);
+ weston_view_geometry_dirty(ev);
+ weston_surface_damage(ev->surface);
- if (ivi_output->area.width != surf->hidden_layer_output->area.width &&
+ if (ivi_output->area.width != surf->hidden_layer_output->area.width ||
ivi_output->area.height != surf->hidden_layer_output->area.height) {
weston_desktop_surface_set_maximized(dsurf, true);
weston_desktop_surface_set_size(dsurf,
struct ivi_output *remote_output =
ivi_layout_find_with_app_id(app_id, ivi);
+ weston_log("Changed activation for app_id %s, type %s, on output %s\n", app_id,
+ ivi_layout_get_surface_role_name(surf), output->output->name);
+
/* if already active on a remote output do not
* attempt to activate it again */
if (remote_output && remote_output->active == surf)
weston_surface_damage(view->surface);
}
- if (wl_resource_get_version(ivi->shell_client.resource) >= AGL_SHELL_APP_STATE_SINCE_VERSION)
- agl_shell_send_app_state(ivi->shell_client.resource, app_id,
- AGL_SHELL_APP_STATE_DEACTIVATED);
+ shell_send_app_state(ivi, app_id, AGL_SHELL_APP_STATE_DEACTIVATED);
}