diff options
-rw-r--r-- | src/desktop.c | 4 | ||||
-rw-r--r-- | src/ivi-compositor.h | 7 | ||||
-rw-r--r-- | src/layout.c | 6 | ||||
-rw-r--r-- | src/main.c | 3 | ||||
-rw-r--r-- | src/shell.c | 2 |
5 files changed, 18 insertions, 4 deletions
diff --git a/src/desktop.c b/src/desktop.c index 3dc1ceb..00cc4db 100644 --- a/src/desktop.c +++ b/src/desktop.c @@ -61,6 +61,7 @@ desktop_surface_added(struct weston_desktop_surface *dsurface, void *userdata) struct weston_desktop_client *dclient; struct wl_client *client; struct ivi_surface *surface; + struct ivi_output *active_output = NULL; const char *app_id = NULL; dclient = weston_desktop_surface_get_client(dsurface); @@ -95,6 +96,9 @@ desktop_surface_added(struct weston_desktop_surface *dsurface, void *userdata) app_id = weston_desktop_surface_get_app_id(dsurface); + if ((active_output = ivi_layout_find_with_app_id(app_id, ivi))) + ivi_set_pending_desktop_surface_remote(active_output, app_id); + if (ivi->shell_client.ready) { ivi_check_pending_desktop_surface(surface); weston_log("Added surface %p, app_id %s, role %s\n", surface, diff --git a/src/ivi-compositor.h b/src/ivi-compositor.h index 3b25915..53e09a3 100644 --- a/src/ivi-compositor.h +++ b/src/ivi-compositor.h @@ -358,4 +358,11 @@ remove_black_surface(struct ivi_output *output); const char * ivi_layout_get_surface_role_name(struct ivi_surface *surf); +void +ivi_set_pending_desktop_surface_remote(struct ivi_output *ioutput, + const char *app_id); + +struct ivi_output * +ivi_layout_find_with_app_id(const char *app_id, struct ivi_compositor *ivi); + #endif diff --git a/src/layout.c b/src/layout.c index 0b8858d..325f712 100644 --- a/src/layout.c +++ b/src/layout.c @@ -236,8 +236,8 @@ ivi_layout_activate_complete(struct ivi_output *output, ivi_layout_get_surface_role_name(surf), output->name); } -static struct ivi_output * -ivi_layout_find_app_id(const char *app_id, struct ivi_compositor *ivi) +struct ivi_output * +ivi_layout_find_with_app_id(const char *app_id, struct ivi_compositor *ivi) { struct ivi_output *out; @@ -303,7 +303,7 @@ ivi_layout_desktop_committed(struct ivi_surface *surf) return; /* check first if there aren't any outputs being set */ - r_output = ivi_layout_find_app_id(app_id, surf->ivi); + r_output = ivi_layout_find_with_app_id(app_id, surf->ivi); if (r_output) { struct weston_view *view = r_output->fullscreen_view.fs->view; @@ -102,6 +102,9 @@ ivi_output_configure_app_id(struct ivi_output *ivi_output) &ivi_output->app_id, NULL); + if (ivi_output->app_id == NULL) + return; + weston_log("Will place app_id %s on output %s\n", ivi_output->app_id, ivi_output->name); } diff --git a/src/shell.c b/src/shell.c index 3f522ba..ac41e1f 100644 --- a/src/shell.c +++ b/src/shell.c @@ -186,7 +186,7 @@ ivi_set_pending_desktop_surface_split(struct ivi_output *ioutput, wl_list_insert(&ivi->split_pending_apps, &split->link); } -static void +void ivi_set_pending_desktop_surface_remote(struct ivi_output *ioutput, const char *app_id) { |