efl_ui_image: guarantee user's mouse up event callback is called.
authorJaehyun Cho <jae_hyun.cho@samsung.com>
Wed, 16 Nov 2016 21:22:44 +0000 (13:22 -0800)
committerJinYong Park <j4939.park@samsung.com>
Tue, 22 Nov 2016 10:46:57 +0000 (19:46 +0900)
Summary:
Without propagating event by hit_rect, user's mouse up event
callback may not be called if image file is replaced in user's mouse
down event callback.

Test Plan:
1. Register mouse up event callback for elm_image by calling
evas_object_event_callback_add() with EVAS_CALLBACK_MOUSE_UP.
2. Register mouse down event callback for elm_image by calling
evas_object_event_callback_add() with EVAS_CALLBACK_MOUSE_DOWN.
3. Replace image file of elm_image by calling elm_image_file_set() in
mouse down event callback.
4. Mouse down on elm_image.
5. Mouse up on elm_image.
6. Since image file object is newly created in mouse down event
callback, mouse up event is not triggered for the newly created image
file object. As a result, mouse up event is not propagated to elm_image
and user's mouse up callback for elm_image is not called.

Reviewers: cedric, woohyun, eunue, jpeg

Reviewed By: jpeg

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D4401

Change-Id: I2bafe1434feb3351d1937b289b2319f27466ca9c
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
src/lib/elm_image.c

index bce02207bda5fbf218d1df4924db054a2b290310..7f411baae5b048775f84623a0d64db32b3ab2fe9 100644 (file)
@@ -562,7 +562,6 @@ _elm_image_evas_object_smart_add(Eo *obj, Elm_Image_Data *priv)
    priv->hit_rect = evas_object_rectangle_add(evas_object_evas_get(obj));
    evas_object_smart_member_add(priv->hit_rect, obj);
    elm_widget_sub_object_add(obj, priv->hit_rect);
-   evas_object_propagate_events_set(priv->hit_rect, EINA_FALSE);
 
    evas_object_color_set(priv->hit_rect, 0, 0, 0, 0);
    evas_object_show(priv->hit_rect);