X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fshell.c;fp=src%2Fshell.c;h=2ce6ac40a5458566bb78b6c3270d8bf3a6742713;hb=2edba91d3eab0d7b3c490c12be1f9bc3b5255aa8;hp=1aabb5ade62d36febdb94d70b25635e544105717;hpb=a68408367cf5e254d981e1d43ba261b9aade6166;p=src%2Fagl-compositor.git diff --git a/src/shell.c b/src/shell.c index 1aabb5a..2ce6ac4 100644 --- a/src/shell.c +++ b/src/shell.c @@ -1664,6 +1664,20 @@ shell_set_app_output(struct wl_client *client, struct wl_resource *res, shell_send_app_on_output(ivi, app_id, woutput->name); } +static void +shell_set_app_position(struct wl_client *client, struct wl_resource *res, + const char *app_id, int32_t x, int32_t y) +{ + struct ivi_compositor *ivi = wl_resource_get_user_data(res); + struct ivi_surface *surf = ivi_find_app(ivi, app_id); + + if (!surf || !app_id || surf->role != IVI_SURFACE_ROLE_POPUP) + return; + + weston_view_set_position(surf->view, x, y); + weston_compositor_schedule_repaint(ivi->compositor); +} + static void shell_ext_destroy(struct wl_client *client, struct wl_resource *res) { @@ -1692,6 +1706,7 @@ static const struct agl_shell_interface agl_shell_implementation = { .set_app_normal = shell_set_app_normal, .set_app_fullscreen = shell_set_app_fullscreen, .set_app_output = shell_set_app_output, + .set_app_position = shell_set_app_position, }; static const struct agl_shell_ext_interface agl_shell_ext_implementation = { @@ -1993,7 +2008,7 @@ int ivi_shell_create_global(struct ivi_compositor *ivi) { ivi->agl_shell = wl_global_create(ivi->compositor->wl_display, - &agl_shell_interface, 8, + &agl_shell_interface, 9, ivi, bind_agl_shell); if (!ivi->agl_shell) { weston_log("Failed to create wayland global.\n");