Commit 65160dca authored by Nobuhiko Tanibata's avatar Nobuhiko Tanibata Committed by Pekka Paalanen
Browse files

ivi-shell: fit source rectangle of ivi-surface to the size of application content.

When application changes the size of its content, UI shall fit the source
rectangle, view area, to the size of its content to show whole content.
Signed-off-by: default avatarNobuhiko Tanibata <>
Acked-by: Pekka Paalanen's avatarPekka Paalanen <>
parent bcff6327
......@@ -542,6 +542,45 @@ set_notification_configure_surface(struct ivi_layout_surface *ivisurf,
void *userdata)
struct hmi_controller *hmi_ctrl = userdata;
struct ivi_layout_layer *application_layer =
struct weston_surface *surface;
struct ivi_layout_surface **ivisurfs;
int32_t length = 0;
int32_t i;
/* return if the surface is not application content */
if (is_surf_in_ui_widget(hmi_ctrl, ivisurf)) {
* if application changes size of wl_buffer. The source rectangle shall be
* fit to the size.
surface = ivi_controller_interface->surface_get_weston_surface(ivisurf);
if (surface) {
ivisurf, 0, 0, surface->width,
* search if the surface is already added to layer.
* If not yet, it is newly invoded application to go to switch_mode.
&length, &ivisurfs);
for (i = 0; i < length; i++) {
if (ivisurf == ivisurfs[i]) {
* if it is non new invoked application, just call
* commit_changes to apply source_rectangle.
switch_mode(hmi_ctrl, hmi_ctrl->layout_mode);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment