From f866dfaa0975a5a64c3a8121843e8b9ba335086d Mon Sep 17 00:00:00 2001 From: "Tran Ba Khang(MS/EMC31-XC)" Date: Thu, 2 Feb 2023 11:10:47 +0700 Subject: [PATCH] hmi-controller: doesn't do a configuring when surface has no content ivi-shell has allowed to notify a surface configuring when detecting an unmapping commit. To avoid the commit_change with source_width and source_height are zero, we should don't do a configuring when surface has no content. Signed-off-by: Tran Ba Khang(MS/EMC31-XC) --- ivi-shell/hmi-controller.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ivi-shell/hmi-controller.c b/ivi-shell/hmi-controller.c index b974afd00..c76955a99 100644 --- a/ivi-shell/hmi-controller.c +++ b/ivi-shell/hmi-controller.c @@ -605,6 +605,8 @@ set_notification_configure_surface(struct wl_listener *listener, void *data) */ surface = hmi_ctrl->interface->surface_get_weston_surface(ivisurf); if (surface) { + if (!weston_surface_has_content(surface)) + return; hmi_ctrl->interface->surface_set_source_rectangle( ivisurf, 0, 0, surface->width, surface->height); @@ -664,6 +666,8 @@ set_notification_configure_desktop_surface(struct wl_listener *listener, void *d */ surface = hmi_ctrl->interface->surface_get_weston_surface(ivisurf); if (surface) { + if (!weston_surface_has_content(surface)) + return; hmi_ctrl->interface->surface_set_source_rectangle(ivisurf, 0, 0, surface->width, surface->height); }