ctxpopup - fix double show emit.
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Wed, 16 Oct 2013 11:17:57 +0000 (20:17 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Wed, 16 Oct 2013 11:17:57 +0000 (20:17 +0900)
src/lib/elc_ctxpopup.c
src/lib/elm_widget_ctxpopup.h

index 4431cfa..5c3727b 100644 (file)
@@ -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);
 
index 11f3992..bdd5921 100644 (file)
@@ -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;
 };