Evas_Coord cx, cy, cw, ch;
Eina_List *items;
Eina_List *item_providers;
+ Ecore_Job *hovdeljob;
Mod_Api *api; // module api if supplied
Eina_Bool changed : 1;
Eina_Bool linewrap : 1;
Elm_Entry_Context_Menu_Item *it;
Elm_Entry_Item_Provider *ip;
+ if (wd->hovdeljob) ecore_job_del(wd->hovdeljob);
if ((wd->api) && (wd->api->obj_unhook)) wd->api->obj_unhook(obj); // module - unhook
entries = eina_list_remove(entries, obj);
}
static void
-_dismissed(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+_hover_del(void *data)
{
Widget_Data *wd = elm_widget_data_get(data);
if (!wd) return;
+
+ if (wd->hoversel)
+ {
+ evas_object_del(wd->hoversel);
+ wd->hoversel = NULL;
+ }
+ wd->hovdeljob = NULL;
+}
+
+static void
+_dismissed(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+{
+ Widget_Data *wd = elm_widget_data_get(data);
+ if (!wd) return;
if (wd->hoversel) evas_object_hide(wd->hoversel);
if (wd->selmode)
{
edje_object_part_text_select_allow_set(wd->ent, "elm.text", 1);
}
elm_widget_scroll_freeze_pop(data);
- if (wd->hoversel)
- {
- evas_object_del(wd->hoversel);
- wd->hoversel = NULL;
- }
+ if (wd->hovdeljob) ecore_job_del(wd->hovdeljob);
+ wd->hovdeljob = ecore_job_add(_hover_del, data);
}
static void
static void _smart_init(void);
static inline Eina_Bool _elm_widget_is(const Evas_Object *obj);
+static void _if_focused_revert(Evas_Object *obj);
+
/* local subsystem globals */
static Evas_Smart *_e_smart = NULL;
return best;
}
+static void
+_if_focused_revert(Evas_Object *obj)
+{
+ Evas_Object *top;
+ Evas_Object *newest = NULL;
+ unsigned int newest_focus_order = 0;
+
+ INTERNAL_ENTRY;
+
+ if (!sd->focused) return;
+ if (!sd->parent_obj) return;
+
+ top = elm_widget_top_get(sd->parent_obj);
+ if (top)
+ {
+ newest = _newest_focus_order_get(top, &newest_focus_order);
+ if (newest)
+ {
+ elm_object_unfocus(newest);
+ elm_object_focus(newest);
+ }
+ }
+}
+
static void
_smart_del(Evas_Object *obj)
{
if (sd->style) eina_stringshare_del(sd->style);
if (sd->type) eina_stringshare_del(sd->type);
if (sd->theme) elm_theme_free(sd->theme);
- if (sd->focused)
- {
- if (sd->parent_obj)
- {
- Evas_Object *top = elm_widget_top_get(sd->parent_obj);
- Evas_Object *newest = NULL;
- unsigned int newest_focus_order = 0;
-
- if (top)
- {
- newest = _newest_focus_order_get(top, &newest_focus_order);
- if (newest)
- {
- elm_object_unfocus(newest);
- elm_object_focus(newest);
- }
- }
- }
- }
+ _if_focused_revert(obj);
free(sd);
}
{
INTERNAL_ENTRY;
evas_object_hide(sd->resize_obj);
+ _if_focused_revert(obj);
}
static void