diff --git a/ivi-shell/ivi-layout-private.h b/ivi-shell/ivi-layout-private.h index 1898a177..5a0119c6 100644 --- a/ivi-shell/ivi-layout-private.h +++ b/ivi-shell/ivi-layout-private.h @@ -180,6 +180,9 @@ ivi_layout_surface_set_opacity(struct ivi_layout_surface *ivisurf, int32_t ivi_layout_surface_set_visibility(struct ivi_layout_surface *ivisurf, bool newVisibility); +void +ivi_layout_surface_set_size(struct ivi_layout_surface *ivisurf, + int32_t width, int32_t height); struct ivi_layout_surface * ivi_layout_get_surface_from_id(uint32_t id_surface); int32_t diff --git a/ivi-shell/ivi-layout-transition.c b/ivi-shell/ivi-layout-transition.c index a223b58a..b07c9d0e 100644 --- a/ivi-shell/ivi-layout-transition.c +++ b/ivi-shell/ivi-layout-transition.c @@ -308,9 +308,9 @@ transition_move_resize_view_destroy(struct ivi_layout_transition *transition) (struct move_resize_view_data *)transition->private_data; struct ivi_layout_surface *layout_surface = data->surface; - shell_surface_send_configure(layout_surface->surface, - layout_surface->prop.dest_width, - layout_surface->prop.dest_height); + ivi_layout_surface_set_size(layout_surface, + layout_surface->prop.dest_width, + layout_surface->prop.dest_height); if (transition->private_data) { free(transition->private_data); diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c index bf0bccc7..266a3962 100644 --- a/ivi-shell/ivi-layout.c +++ b/ivi-shell/ivi-layout.c @@ -699,15 +699,9 @@ commit_surface_list(struct ivi_layout *layout) ivisurf->pending.prop.transition_type = IVI_LAYOUT_TRANSITION_NONE; if (configured && !is_surface_transition(ivisurf)) { - if (weston_surface_is_desktop_surface(ivisurf->surface)) { - weston_desktop_surface_set_size(ivisurf->weston_desktop_surface, - ivisurf->prop.dest_width, - ivisurf->prop.dest_height); - } else { - shell_surface_send_configure(ivisurf->surface, - ivisurf->prop.dest_width, - ivisurf->prop.dest_height); - } + ivi_layout_surface_set_size(ivisurf, + ivisurf->prop.dest_width, + ivisurf->prop.dest_height); } } else { configured = 0; @@ -721,9 +715,9 @@ commit_surface_list(struct ivi_layout *layout) ivisurf->pending.prop.transition_type = IVI_LAYOUT_TRANSITION_NONE; if (configured && !is_surface_transition(ivisurf)) { - shell_surface_send_configure(ivisurf->surface, - ivisurf->prop.dest_width, - ivisurf->prop.dest_height); + ivi_layout_surface_set_size(ivisurf, + ivisurf->prop.dest_width, + ivisurf->prop.dest_height); } } } @@ -1556,6 +1550,19 @@ ivi_layout_surface_set_destination_rectangle(struct ivi_layout_surface *ivisurf, return IVI_SUCCEEDED; } +void +ivi_layout_surface_set_size(struct ivi_layout_surface *ivisurf, + int32_t width, int32_t height) +{ + if (weston_surface_is_desktop_surface(ivisurf->surface)) { + weston_desktop_surface_set_size(ivisurf->weston_desktop_surface, + width, height); + } else { + shell_surface_send_configure(ivisurf->surface, + width, height); + } +} + static int32_t ivi_layout_screen_add_layer(struct weston_output *output, struct ivi_layout_layer *addlayer)