ivi_layout_surface_configure is called from ivi-shell when configure
listener of weston surface is triggered. This function shall do,
- emit signal to hmi-controller to notify the configuration change

Other unnecesary logics are cleaned up.

Signed-off-by: Nobuhiko Tanibata <nobuhiko_tanib...@xddp.denso.co.jp>
Acked-by: Pekka Paalanen <pekka.paala...@collabora.co.uk>
---
 ivi-shell/ivi-layout.c | 25 +++----------------------
 1 file changed, 3 insertions(+), 22 deletions(-)

diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
index cd4a171..dc6053d 100644
--- a/ivi-shell/ivi-layout.c
+++ b/ivi-shell/ivi-layout.c
@@ -2691,29 +2691,10 @@ ivi_layout_surface_configure(struct ivi_layout_surface 
*ivisurf,
                             int32_t width, int32_t height)
 {
        struct ivi_layout *layout = get_instance();
-       int32_t in_init = 0;
-       ivisurf->surface->width_from_buffer  = width;
-       ivisurf->surface->height_from_buffer = height;
 
-       if (ivisurf->prop.source_width == 0 || ivisurf->prop.source_height == 
0) {
-               in_init = 1;
-       }
-
-       /* FIXME: when sourceHeight/Width is used as clipping range in image 
buffer */
-       /* if (ivisurf->prop.sourceWidth == 0 || ivisurf->prop.sourceHeight == 
0) { */
-               ivisurf->pending.prop.source_width = width;
-               ivisurf->pending.prop.source_height = height;
-               ivisurf->prop.source_width = width;
-               ivisurf->prop.source_height = height;
-       /* } */
-
-       ivisurf->event_mask |= IVI_NOTIFICATION_CONFIGURE;
-
-       if (in_init) {
-               wl_signal_emit(&layout->surface_notification.configure_changed, 
ivisurf);
-       } else {
-               ivi_layout_commit_changes();
-       }
+       /* emit callback which is set by ivi-layout api user */
+       wl_signal_emit(&layout->surface_notification.configure_changed,
+                      ivisurf);
 }
 
 static int32_t
-- 
1.8.3.1

_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to