summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
fee13f7)
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ia196e7d3b34694d7cb169228429a0e940eae8b3b
to activate other apps">
</description>
to activate other apps">
</description>
+ <event name="application">
+ <description summary="advertise app_id available for activating">
+ The compositor may choose to advertise one or more application ids which
+ can be used to switch to.
+
+ When this global is bound, the compositor will send all application ids
+ available for activation, but may send additional application id at any
+ time (when they've been mapped in the compositor).
+ </description>
+ <arg name="app_id" type="string"/>
+ </event>
+
<request name="activate_app">
<description summary="make client current window">
Ask the compositor to make a toplevel to become the current/focused
<request name="activate_app">
<description summary="make client current window">
Ask the compositor to make a toplevel to become the current/focused
void
ivi_set_desktop_surface(struct ivi_surface *surface)
{
void
ivi_set_desktop_surface(struct ivi_surface *surface)
{
+ struct desktop_client *dclient;
+ struct ivi_compositor *ivi = surface->ivi;
assert(surface->role == IVI_SURFACE_ROLE_NONE);
surface->role = IVI_SURFACE_ROLE_DESKTOP;
wl_list_insert(&surface->ivi->surfaces, &surface->link);
assert(surface->role == IVI_SURFACE_ROLE_NONE);
surface->role = IVI_SURFACE_ROLE_DESKTOP;
wl_list_insert(&surface->ivi->surfaces, &surface->link);
+
+ /* advertise to all desktop clients the new surface */
+ wl_list_for_each(dclient, &ivi->desktop_clients, link) {
+ const char *app_id =
+ weston_desktop_surface_get_app_id(surface->dsurface);
+ agl_shell_desktop_send_application(dclient->resource, app_id);
+ }
+static void
+ivi_shell_advertise_xdg_surfaces(struct ivi_compositor *ivi, struct wl_resource *resource)
+{
+ struct ivi_surface *surface;
+
+ wl_list_for_each(surface, &ivi->surfaces, link) {
+ const char *app_id =
+ weston_desktop_surface_get_app_id(surface->dsurface);
+ agl_shell_desktop_send_application(resource, app_id);
+ }
+}
+
static void
client_exec(const char *command, int fd)
{
static void
client_exec(const char *command, int fd)
{
dclient->resource = resource;
wl_list_insert(&ivi->desktop_clients, &dclient->link);
dclient->resource = resource;
wl_list_insert(&ivi->desktop_clients, &dclient->link);
+
+ /* advertise xdg surfaces */
+ ivi_shell_advertise_xdg_surfaces(ivi, resource);