e_comp_object: Add input region set condition 78/289278/1
authorJunkyeong Kim <jk0430.kim@samsung.com>
Fri, 3 Mar 2023 08:33:59 +0000 (17:33 +0900)
committerJunkyeong Kim <jk0430.kim@samsung.com>
Fri, 3 Mar 2023 10:36:26 +0000 (19:36 +0900)
if width or height is 0, input region can be set 0x0.
it can makes region set error.
so do not add rect if width or height is c0.

Change-Id: Icc63a111a0fd6b49efe60d46e9772a096ee0e1d7
Signed-off-by: Junkyeong Kim <jk0430.kim@samsung.com>
src/bin/e_comp_object.c

index 88f57273a0e68e59df036c3a711cd8c88b53dde3..2f31ed07585b9381ae3fbdbcbe4526bca3c33a6f 100644 (file)
@@ -4189,6 +4189,7 @@ e_comp_object_input_area_set(Evas_Object *obj, int x, int y, int w, int h)
      }
 
    if ((input_rect_data) &&
+       ((w > 0) && (h > 0)) &&
        (x || y || (w != cw->ec->client.w) || (h != cw->ec->client.h)))
      {
         input_rect_data->obj = evas_object_rectangle_add(e_comp->evas);
@@ -4207,6 +4208,11 @@ e_comp_object_input_area_set(Evas_Object *obj, int x, int y, int w, int h)
              evas_object_show(cw->input_obj);
           }
      }
+   else if ((input_rect_data) && ((w == 0) || (h == 0)))
+     {
+        input_rect_sd->input_rect_data_list = eina_list_remove(input_rect_sd->input_rect_data_list, input_rect_data);
+        E_FREE(input_rect_data);
+     }
    else
      {
         evas_object_smart_member_del(cw->input_obj);