#define MY_CLASS_NAME "Elm_Notify"
#define MY_CLASS_NAME_LEGACY "elm_notify"
+//TIZEN_ONLY(20170801): to manage show and animation state
+static void
+_notify_visuals_set(Evas_Object *obj)
+{
+ ELM_NOTIFY_DATA_GET(obj, sd);
+
+ if (sd->show_finished)
+ {
+ if (!sd->allow_events) elm_layout_signal_emit(sd->block_events, "elm,state,visible", "elm");
+ edje_object_signal_emit(sd->notify, "elm,state,visible", "elm");
+ }
+ else if (evas_object_visible_get(obj))
+ {
+ if (!sd->allow_events) elm_layout_signal_emit(sd->block_events, "elm,state,show,animation", "elm");
+ edje_object_signal_emit(sd->notify, "elm,state,show,animation", "elm");
+ }
+}
+//END
+
static Elm_Theme_Apply
_notify_theme_apply(Evas_Object *obj)
{
_sizing_eval(obj);
//TIZEN_ONLY(20161018): fix theme apply problem by font/language change
- if (sd->show_finished)
- {
- elm_layout_signal_emit(sd->block_events, "elm,state,visible", "elm");
- edje_object_signal_emit(sd->notify, "elm,state,visible", "elm");
- }
- else if (evas_object_visible_get(obj))
- {
- elm_layout_signal_emit(sd->block_events, "elm,state,show,animation", "elm");
- edje_object_signal_emit(sd->notify, "elm,state,show,animation", "elm");
- }
+ _notify_visuals_set(obj);
//
//TIZEN_ONLY(20170107): finish the hiding forcibly if get interrupt
if (sd->hide_ongoing)
sd->hide_ongoing = EINA_FALSE;
eo_do_super(obj, MY_CLASS, evas_obj_smart_hide());
evas_object_hide(sd->notify);
- if (sd->allow_events) evas_object_hide(sd->block_events);
+ if (!sd->allow_events) evas_object_hide(sd->block_events);
}
//
eo_do_super(obj, MY_CLASS, evas_obj_smart_show());
{
eo_do_super(obj, MY_CLASS, evas_obj_smart_hide());
evas_object_hide(sd->notify);
- if (sd->allow_events) evas_object_hide(sd->block_events);
+ if (!sd->allow_events) evas_object_hide(sd->block_events);
}
ELM_SAFE_FREE(sd->timer, ecore_timer_del);
}
_calc(obj);
/* TIZEN_ONLY(20170329): add signal emit after align set */
- if (sd->show_finished)
- edje_object_signal_emit(sd->notify, "elm,state,visible", "elm");
+ _notify_visuals_set(obj);
/* END */
}
if (sd->hide_ongoing) return;
sd->hide_ongoing = EINA_TRUE;
//
- elm_layout_signal_emit(sd->block_events, "elm,state,hide", "elm");
+ //TIZEN_ONLY(20170801): block_events must be checked it is null or not null
+ //elm_layout_signal_emit(sd->block_events, "elm,state,hide", "elm");
+ if (!sd->allow_events) elm_layout_signal_emit(sd->block_events, "elm,state,hide", "elm");
+ //END
edje_object_signal_emit(sd->notify, "elm,state,hide", "elm");
/* TIZEN_ONLY(20170411): cancel timer when dismiss notify */