diff --git a/ivi-shell/ivi-layout-transition.c b/ivi-shell/ivi-layout-transition.c index 45b8dc5a..966473bf 100644 --- a/ivi-shell/ivi-layout-transition.c +++ b/ivi-shell/ivi-layout-transition.c @@ -31,6 +31,7 @@ #include #include +#include "ivi-shell.h" #include "ivi-layout-export.h" #include "ivi-layout-private.h" @@ -303,6 +304,9 @@ transition_move_resize_view_destroy(struct ivi_layout_transition *transition) struct ivi_layout_surface *layout_surface = data->surface; wl_signal_emit(&layout_surface->configured, layout_surface); + shell_surface_send_configure(layout_surface->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 77578d45..f1ea9bd7 100644 --- a/ivi-shell/ivi-layout.c +++ b/ivi-shell/ivi-layout.c @@ -61,6 +61,7 @@ #include #include "compositor.h" +#include "ivi-shell.h" #include "ivi-layout-export.h" #include "ivi-layout-private.h" @@ -776,8 +777,12 @@ commit_surface_list(struct ivi_layout *layout) ivisurf->prop.transition_type = IVI_LAYOUT_TRANSITION_NONE; ivisurf->pending.prop.transition_type = IVI_LAYOUT_TRANSITION_NONE; - if (configured && !is_surface_transition(ivisurf)) + if (configured && !is_surface_transition(ivisurf)) { wl_signal_emit(&ivisurf->configured, ivisurf); + shell_surface_send_configure(ivisurf->surface, + ivisurf->prop.dest_width, + ivisurf->prop.dest_height); + } } else { configured = 0; if (ivisurf->prop.dest_width != ivisurf->pending.prop.dest_width || @@ -789,8 +794,12 @@ commit_surface_list(struct ivi_layout *layout) ivisurf->prop.transition_type = IVI_LAYOUT_TRANSITION_NONE; ivisurf->pending.prop.transition_type = IVI_LAYOUT_TRANSITION_NONE; - if (configured && !is_surface_transition(ivisurf)) + if (configured && !is_surface_transition(ivisurf)) { wl_signal_emit(&ivisurf->configured, ivisurf); + shell_surface_send_configure(ivisurf->surface, + ivisurf->prop.dest_width, + ivisurf->prop.dest_height); + } } } } diff --git a/ivi-shell/ivi-shell.c b/ivi-shell/ivi-shell.c index 19140cea..7a537698 100644 --- a/ivi-shell/ivi-shell.c +++ b/ivi-shell/ivi-shell.c @@ -63,8 +63,6 @@ struct ivi_shell_surface int32_t height; struct wl_list link; - - struct wl_listener configured_listener; }; struct ivi_shell_setting @@ -77,25 +75,6 @@ struct ivi_shell_setting * Implementation of ivi_surface */ -static void -surface_configure_notify(struct wl_listener *listener, void *data) -{ - struct ivi_layout_surface *layout_surf = - (struct ivi_layout_surface *)data; - - struct ivi_shell_surface *shell_surf = - container_of(listener, - struct ivi_shell_surface, - configured_listener); - - int32_t dest_width = layout_surf->prop.dest_width; - int32_t dest_height = layout_surf->prop.dest_height; - - if (shell_surf->resource) - ivi_surface_send_configure(shell_surf->resource, - dest_width, dest_height); -} - static void ivi_shell_surface_configure(struct weston_surface *, int32_t, int32_t); @@ -108,6 +87,21 @@ get_ivi_shell_surface(struct weston_surface *surface) return NULL; } +void +shell_surface_send_configure(struct weston_surface *surface, + int32_t width, int32_t height) +{ + struct ivi_shell_surface *shsurf; + + shsurf = get_ivi_shell_surface(surface); + assert(shsurf); + if (!shsurf) + return; + + if (shsurf->resource) + ivi_surface_send_configure(shsurf->resource, width, height); +} + static void ivi_shell_surface_configure(struct weston_surface *surface, int32_t sx, int32_t sy) @@ -255,9 +249,7 @@ application_surface_create(struct wl_client *client, ivisurf->width = 0; ivisurf->height = 0; ivisurf->layout_surface = layout_surface; - ivisurf->configured_listener.notify = surface_configure_notify; - ivi_layout_surface_add_configured_listener(layout_surface, - &ivisurf->configured_listener); + /* * The following code relies on wl_surface destruction triggering * immediateweston_surface destruction diff --git a/ivi-shell/ivi-shell.h b/ivi-shell/ivi-shell.h index 744d9691..45faceb4 100644 --- a/ivi-shell/ivi-shell.h +++ b/ivi-shell/ivi-shell.h @@ -69,4 +69,8 @@ input_panel_setup(struct ivi_shell *shell); void input_panel_destroy(struct ivi_shell *shell); +void +shell_surface_send_configure(struct weston_surface *surface, + int32_t width, int32_t height); + #endif /* WESTON_IVI_SHELL_H */