notify: fix hide animation logic for popup
authorJinYong Park <j4939.park@samsung.com>
Wed, 12 Apr 2017 21:25:51 +0000 (14:25 -0700)
committerCedric BAIL <cedric@osg.samsung.com>
Wed, 12 Apr 2017 21:25:53 +0000 (14:25 -0700)
Summary:
When popup is timeout, notify call hide func, and send time out event to popup.
After popup receiving time out event, popup hide object again,
so hide animation doesn't show.
And notify hide function doesn't send hide signal to block events part,
(but dismiss function send it)
So add that signal.

Test Plan:
 1. elementary_test -to popup
 2. click first item, "popup+center+text"
 3. compare time out event before this patch and after.

@fix

Reviewers: herb, singh.amitesh, Hermet, cedric, raster, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
src/bin/elementary/test_popup.c
src/lib/elementary/elm_notify.c

index dc1274e..7de2588 100644 (file)
@@ -134,7 +134,7 @@ _popup_center_text_cb(void *data, Evas_Object *obj EINA_UNUSED,
    elm_object_text_set(popup, "This Popup has content area and "
                        "timeout value is 3 seconds");
    elm_popup_timeout_set(popup, 3.0);
-   evas_object_smart_callback_add(popup, "timeout", _response_cb, popup);
+   evas_object_smart_callback_add(popup, "dismissed", _response_cb, popup);
    evas_object_event_callback_add(popup, EVAS_CALLBACK_KEY_DOWN,
                                   _popup_key_down_cb, NULL);
 
index 6bb58be..4ef5514 100644 (file)
@@ -270,6 +270,7 @@ _timer_cb(void *data)
    if (!evas_object_visible_get(obj)) goto end;
 
    evas_object_hide(obj);
+   sd->in_timeout = EINA_TRUE;
    efl_event_callback_legacy_call(obj, ELM_NOTIFY_EVENT_TIMEOUT, NULL);
 
 end:
@@ -312,7 +313,10 @@ _elm_notify_hide(Eo *obj EINA_UNUSED, Elm_Notify_Data *sd)
    if (eina_streq(hide_signal, "on"))
      {
         if (!sd->in_timeout)
-          edje_object_signal_emit(sd->notify, "elm,state,hide", "elm");
+          {
+             elm_layout_signal_emit(sd->block_events, "elm,state,hide", "elm");
+             edje_object_signal_emit(sd->notify, "elm,state,hide", "elm");
+          }
      }
    else //for backport supporting: edc without emitting hide finished signal
      {