summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ivi-compositor.h10
-rw-r--r--src/shell.c21
2 files changed, 26 insertions, 5 deletions
diff --git a/src/ivi-compositor.h b/src/ivi-compositor.h
index 53e09a3..7b5c18f 100644
--- a/src/ivi-compositor.h
+++ b/src/ivi-compositor.h
@@ -155,10 +155,16 @@ enum ivi_surface_role {
IVI_SURFACE_ROLE_REMOTE,
};
+struct ivi_bounding_box {
+ int x; int y;
+ int width; int height;
+};
+
struct pending_popup {
struct ivi_output *ioutput;
char *app_id;
int x; int y;
+ struct ivi_bounding_box bb;
struct wl_list link; /** ivi_compositor::popup_pending_surfaces */
};
@@ -193,8 +199,8 @@ struct ivi_background_surface {
struct ivi_popup_surface {
struct ivi_output *output;
- int x;
- int y;
+ int x; int y; /* initial position */
+ struct ivi_bounding_box bb; /* bounding box */
};
struct ivi_fullscreen_surface {
diff --git a/src/shell.c b/src/shell.c
index f969503..5561898 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -137,7 +137,8 @@ ivi_set_desktop_surface_split(struct ivi_surface *surface)
static void
ivi_set_pending_desktop_surface_popup(struct ivi_output *ioutput,
- int x, int y, const char *app_id)
+ int x, int y, int bx, int by, int width, int height,
+ const char *app_id)
{
struct ivi_compositor *ivi = ioutput->ivi;
size_t len_app_id = strlen(app_id);
@@ -150,6 +151,11 @@ ivi_set_pending_desktop_surface_popup(struct ivi_output *ioutput,
p_popup->x = x;
p_popup->y = y;
+ p_popup->bb.x = bx;
+ p_popup->bb.y = by;
+ p_popup->bb.width = width;
+ p_popup->bb.height = height;
+
wl_list_insert(&ivi->popup_pending_apps, &p_popup->link);
}
@@ -267,6 +273,12 @@ ivi_check_pending_desktop_surface_popup(struct ivi_surface *surface)
surface->popup.output = p_popup->ioutput;
surface->popup.x = p_popup->x;
surface->popup.y = p_popup->y;
+
+ surface->popup.bb.x = p_popup->bb.x;
+ surface->popup.bb.y = p_popup->bb.y;
+ surface->popup.bb.width = p_popup->bb.width;
+ surface->popup.bb.height = p_popup->bb.height;
+
ivi_remove_pending_desktop_surface_popup(p_popup);
return true;
}
@@ -858,7 +870,9 @@ static void
shell_desktop_set_app_property(struct wl_client *client,
struct wl_resource *shell_res,
const char *app_id, uint32_t role,
- int x, int y, struct wl_resource *output_res)
+ int x, int y, int bx, int by,
+ int width, int height,
+ struct wl_resource *output_res)
{
struct weston_head *head = weston_head_from_resource(output_res);
struct weston_output *woutput = weston_head_get_output(head);
@@ -866,7 +880,8 @@ shell_desktop_set_app_property(struct wl_client *client,
switch (role) {
case AGL_SHELL_DESKTOP_APP_ROLE_POPUP:
- ivi_set_pending_desktop_surface_popup(output, x, y, app_id);
+ ivi_set_pending_desktop_surface_popup(output, x, y, bx, by,
+ width, height, app_id);
break;
case AGL_SHELL_DESKTOP_APP_ROLE_FULLSCREEN:
ivi_set_pending_desktop_surface_fullscreen(output, app_id);