From 6da4e97e3fdec4b5a7ec746f04f8fbfa8751669b Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Wed, 16 Oct 2013 20:17:57 +0900 Subject: [PATCH] ctxpopup - fix double show emit. --- legacy/elementary/src/lib/elc_ctxpopup.c | 6 ++++-- legacy/elementary/src/lib/elm_widget_ctxpopup.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/legacy/elementary/src/lib/elc_ctxpopup.c b/legacy/elementary/src/lib/elc_ctxpopup.c index 4431cfa3f5..5c3727b066 100644 --- a/legacy/elementary/src/lib/elc_ctxpopup.c +++ b/legacy/elementary/src/lib/elc_ctxpopup.c @@ -520,7 +520,9 @@ _show_signals_emit(Evas_Object *obj, if (!sd->visible) return; if ((sd->list) && (!sd->list_visible)) return; + if (sd->emitted) return; + sd->emitted = EINA_TRUE; switch (dir) { case ELM_CTXPOPUP_DIRECTION_UP: @@ -989,13 +991,13 @@ _on_show(void *data __UNUSED__, if (!sd->content) return; + sd->emitted = EINA_FALSE; sd->visible = EINA_TRUE; evas_object_show(sd->bg); evas_object_show(sd->arrow); - edje_object_signal_emit(sd->bg, "elm,state,show", "elm"); - elm_layout_signal_emit(obj, "elm,state,show", "elm"); + _show_signals_emit(obj, sd->dir); elm_layout_sizing_eval(obj); diff --git a/legacy/elementary/src/lib/elm_widget_ctxpopup.h b/legacy/elementary/src/lib/elm_widget_ctxpopup.h index 11f39926a7..bdd5921daf 100644 --- a/legacy/elementary/src/lib/elm_widget_ctxpopup.h +++ b/legacy/elementary/src/lib/elm_widget_ctxpopup.h @@ -51,6 +51,7 @@ struct _Elm_Ctxpopup_Smart_Data Eina_Bool list_visible : 1; Eina_Bool horizontal : 1; Eina_Bool finished : 1; + Eina_Bool emitted : 1; Eina_Bool visible : 1; };