From: Jinkun Jang Date: Mon, 18 Mar 2013 02:36:00 +0000 (+0900) Subject: sync with master X-Git-Tag: accepted/tizen/20130607.213307~145 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e7a831d8a3462006d978dabffb7f8e31beb62b30;p=profile%2Fmobile%2Felementary.git sync with master --- diff --git a/packaging/elementary.spec b/packaging/elementary.spec index f066fbe..205feaf 100755 --- a/packaging/elementary.spec +++ b/packaging/elementary.spec @@ -1,7 +1,7 @@ #sbs-git:slp/pkgs/e/elementary elementary 1.0.0+svn.70492slp2+build11 Name: elementary Summary: EFL toolkit for small touchscreens -Version: 1.7.1+svn.77535slp2+build73r01 +Version: 1.7.1+svn.77535slp2+build76r01 Release: 1 Group: System/Libraries License: LGPLv2.1 diff --git a/src/lib/elc_ctxpopup.c b/src/lib/elc_ctxpopup.c index 20bab36..3cdaa04 100644 --- a/src/lib/elc_ctxpopup.c +++ b/src/lib/elc_ctxpopup.c @@ -28,17 +28,18 @@ _elm_ctxpopup_smart_focus_next(const Evas_Object *obj, if (!sd) return EINA_FALSE; - if (!elm_widget_focus_next_get(sd->box, dir, next)) + if (eina_list_count(sd->items)) { - elm_widget_focused_object_clear(sd->box); - elm_widget_focus_next_get(sd->box, dir, next); - } - - EINA_LIST_FOREACH(sd->items, elist, it) - items = eina_list_append(items, it->base.access_obj); + EINA_LIST_FOREACH(sd->items, elist, it) + items = eina_list_append(items, it->base.access_obj); - return elm_widget_focus_list_next_get - (obj, items, eina_list_data_get, dir, next); + return elm_widget_focus_list_next_get + (obj, items, eina_list_data_get, dir, next); + } + else + { + return elm_widget_focus_next_get(sd->box, dir, next); + } } static Eina_Bool diff --git a/src/lib/elc_naviframe.c b/src/lib/elc_naviframe.c index 3a50661..8cd5389 100644 --- a/src/lib/elc_naviframe.c +++ b/src/lib/elc_naviframe.c @@ -459,11 +459,10 @@ _item_del_pre_hook(Elm_Object_Item *it) if (evas_object_data_get(VIEW(nit), "out_of_list")) goto end; - if (nit->content && !sd->on_deletion) + if (!sd->on_deletion) { - nit->content_unfocusable = - elm_widget_tree_unfocusable_get(nit->content); - elm_widget_tree_unfocusable_set(nit->content, EINA_TRUE); + nit->unfocusable = elm_widget_tree_unfocusable_get(VIEW(nit)); + elm_widget_tree_unfocusable_set(VIEW(nit), EINA_TRUE); } if (sd->stack->last->prev) @@ -1025,8 +1024,7 @@ _on_item_push_finished(void *data, evas_object_hide(VIEW(it)); - if (it->content) - elm_widget_tree_unfocusable_set(it->content, it->content_unfocusable); + elm_widget_tree_unfocusable_set(VIEW(it), it->unfocusable); if (sd->freeze_events) evas_object_freeze_events_set(VIEW(it), EINA_FALSE); @@ -1044,8 +1042,8 @@ _on_item_pop_finished(void *data, ELM_NAVIFRAME_DATA_GET(WIDGET(it), sd); - if (sd->preserve && it->content) - elm_widget_tree_unfocusable_set(it->content, it->content_unfocusable); + if (sd->preserve) + elm_widget_tree_unfocusable_set(VIEW(it), it->unfocusable); sd->popping = eina_list_remove(sd->popping, it); elm_widget_item_del(data); @@ -1061,12 +1059,20 @@ _on_item_show_finished(void *data, const char *source __UNUSED__) { Elm_Naviframe_Item *it = data; + unsigned int order = 0; + Evas_Object *newest; ELM_NAVIFRAME_DATA_GET(WIDGET(it), sd); elm_object_signal_emit(VIEW(it), "elm,state,visible", "elm"); - elm_widget_tree_unfocusable_set(it->content, it->content_unfocusable); + elm_widget_tree_unfocusable_set(VIEW(it), it->unfocusable); + + newest = elm_widget_newest_focus_order_get(VIEW(it), &order, EINA_TRUE); + if (newest) + elm_object_focus_set(newest, EINA_TRUE); + else + elm_object_focus_set(VIEW(it), EINA_TRUE); if (sd->freeze_events) evas_object_freeze_events_set(VIEW(it), EINA_FALSE); @@ -1209,19 +1215,15 @@ _elm_naviframe_smart_focus_next(const Evas_Object *obj, Eina_Bool ret; Eina_List *l = NULL; Elm_Naviframe_Item *top_it; - Elm_Naviframe_Content_Item_Pair *content_pair = NULL; void *(*list_data_get)(const Eina_List *list); top_it = (Elm_Naviframe_Item *)elm_naviframe_top_item_get(obj); if (!top_it) return EINA_FALSE; - if (!top_it->title_visible) - { - return elm_widget_focus_next_get(top_it->content, dir, next); - } - list_data_get = eina_list_data_get; + l = eina_list_append(l, VIEW(top_it)); + /* access */ if (_elm_config->access_mode) { @@ -1229,32 +1231,37 @@ _elm_naviframe_smart_focus_next(const Evas_Object *obj, if (ao) l = eina_list_append(l, ao); } - /* icon would be able to have an widget. ex: segment control */ - if ((top_it->title_icon) && - (elm_widget_can_focus_get(top_it->title_icon) || - elm_widget_child_can_focus_get(top_it->title_icon))) - l = eina_list_append(l, top_it->title_icon); - - if (top_it->title_prev_btn) - l = eina_list_append(l, top_it->title_prev_btn); - if (top_it->title_next_btn) - l = eina_list_append(l, top_it->title_next_btn); - if (top_it->content) - l = eina_list_append(l, top_it->content); - EINA_INLIST_FOREACH(top_it->content_list, content_pair) - { - if (elm_object_part_content_get(VIEW(top_it), content_pair->part)) - l = eina_list_append(l, elm_object_part_content_get(VIEW(top_it), - content_pair->part)); - } - l = eina_list_append(l, VIEW(top_it)); - ret = elm_widget_focus_list_next_get(obj, l, list_data_get, dir, next); eina_list_free(l); return ret; } +static Eina_Bool +_elm_naviframe_smart_focus_direction(const Evas_Object *obj, + const Evas_Object *base, + double degree, + Evas_Object **direction, + double *weight) +{ + Eina_Bool ret; + Eina_List *l = NULL; + Elm_Naviframe_Item *top_it; + void *(*list_data_get)(const Eina_List *list); + + top_it = (Elm_Naviframe_Item *)elm_naviframe_top_item_get(obj); + if (!top_it) return EINA_FALSE; + + list_data_get = eina_list_data_get; + + l = eina_list_append(l, VIEW(top_it)); + ret = elm_widget_focus_list_direction_get + (obj, base, l, list_data_get, degree, direction, weight); + eina_list_free(l); + + return ret; +} + static void _elm_naviframe_smart_add(Evas_Object *obj) { @@ -1369,6 +1376,7 @@ _elm_naviframe_smart_set_user(Elm_Naviframe_Smart_Class *sc) ELM_WIDGET_CLASS(sc)->theme = _elm_naviframe_smart_theme; ELM_WIDGET_CLASS(sc)->focus_next = _elm_naviframe_smart_focus_next; + ELM_WIDGET_CLASS(sc)->focus_direction = _elm_naviframe_smart_focus_direction; ELM_WIDGET_CLASS(sc)->access = _elm_naviframe_smart_access; ELM_WIDGET_CLASS(sc)->event = _elm_naviframe_smart_event; @@ -1462,6 +1470,8 @@ elm_naviframe_item_push(Evas_Object *obj, evas_object_show(VIEW(it)); elm_widget_resize_object_set(obj, VIEW(it)); + if (prev_it) + elm_widget_sub_object_add(obj, VIEW(prev_it)); evas_object_smart_member_add(sd->dummy_edje, obj); if (prev_it) @@ -1480,15 +1490,13 @@ elm_naviframe_item_push(Evas_Object *obj, edje_object_message_signal_process(elm_layout_edje_get(VIEW(prev_it))); edje_object_message_signal_process(elm_layout_edje_get(VIEW(it))); - if (prev_it->content) - { - prev_it->content_unfocusable = - elm_widget_tree_unfocusable_get(prev_it->content); - elm_widget_tree_unfocusable_set(prev_it->content, EINA_TRUE); - } + prev_it->unfocusable = elm_widget_tree_unfocusable_get(VIEW(prev_it)); + elm_widget_tree_unfocusable_set(VIEW(prev_it), EINA_TRUE); it->animator = ecore_animator_add(_push_transition_cb, it); } + else + elm_object_focus_set(VIEW(it), EINA_TRUE); sd->stack = eina_inlist_append(sd->stack, EINA_INLIST_GET(it)); evas_object_raise(VIEW(it)); @@ -1562,9 +1570,11 @@ elm_naviframe_item_insert_after(Evas_Object *obj, if (top_inserted) { elm_widget_resize_object_set(obj, VIEW(it)); + elm_widget_sub_object_add(obj, VIEW(after)); evas_object_smart_member_add(sd->dummy_edje, obj); evas_object_show(VIEW(it)); evas_object_hide(VIEW(after)); + elm_object_focus_set(VIEW(it), EINA_TRUE); } /* access */ @@ -1594,11 +1604,8 @@ elm_naviframe_item_pop(Evas_Object *obj) evas_object_data_set(VIEW(it), "out_of_list", (void *)1); - if (it->content) - { - it->content_unfocusable = elm_widget_tree_unfocusable_get(it->content); - elm_widget_tree_unfocusable_set(it->content, EINA_TRUE); - } + it->unfocusable = elm_widget_tree_unfocusable_get(VIEW(it)); + elm_widget_tree_unfocusable_set(VIEW(it), EINA_TRUE); if (sd->stack->last->prev) prev_it = EINA_INLIST_CONTAINER_GET @@ -1680,6 +1687,7 @@ elm_naviframe_item_pop_to(Elm_Object_Item *it) EAPI void elm_naviframe_item_promote(Elm_Object_Item *it) { + Elm_Object_Item *prev_top; Elm_Naviframe_Item *nit; Elm_Naviframe_Item *prev_it; @@ -1688,12 +1696,14 @@ elm_naviframe_item_promote(Elm_Object_Item *it) nit = (Elm_Naviframe_Item *)it; ELM_NAVIFRAME_DATA_GET(WIDGET(nit), sd); - if (it == elm_naviframe_top_item_get(WIDGET(nit))) return; + prev_top = elm_naviframe_top_item_get(WIDGET(nit)); + if (it == prev_top) return; /* remember, last is 1st on the naviframe, push it to last pos. */ sd->stack = eina_inlist_demote(sd->stack, EINA_INLIST_GET(nit)); elm_widget_resize_object_set(WIDGET(it), VIEW(nit)); + elm_widget_sub_object_add(WIDGET(it), VIEW(prev_top)); evas_object_smart_member_add(sd->dummy_edje, WIDGET(it)); /* this was the previous top one */ @@ -1703,12 +1713,8 @@ elm_naviframe_item_promote(Elm_Object_Item *it) /* re-add as smart member */ evas_object_smart_member_add(VIEW(prev_it), WIDGET(it)); - if (prev_it->content) - { - prev_it->content_unfocusable = - elm_widget_tree_unfocusable_get(prev_it->content); - elm_widget_tree_unfocusable_set(prev_it->content, EINA_TRUE); - } + prev_it->unfocusable = elm_widget_tree_unfocusable_get(VIEW(prev_it)); + elm_widget_tree_unfocusable_set(prev_it->content, EINA_TRUE); if (sd->freeze_events) { diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c index bef3260..6957049 100644 --- a/src/lib/elm_gengrid.c +++ b/src/lib/elm_gengrid.c @@ -113,6 +113,9 @@ _item_show_region(void *data) Evas_Coord vw = 0, vh = 0; Elm_Gen_Item *it; +#if GENGRID_FX_SUPPORT + if (sd->fx_first_captured) return; +#endif evas_object_geometry_get(sd->pan_obj, NULL, NULL, &cvw, &cvh); if ((cvw != 0) && (cvh != 0)) @@ -2055,8 +2058,12 @@ _elm_gengrid_item_del_serious(Elm_Gen_Item *it) if ((!GG_IT(it)->wsd->fx_mode) || (GG_IT(it)->wsd->gengrid_clearing)) #endif { - _elm_gengrid_item_del_common(it); + GG_IT(it)->wsd->items = eina_inlist_remove + (GG_IT(it)->wsd->items, EINA_INLIST_GET(it)); + } + + _elm_gengrid_item_del_common(it); free(it->item); it->item = NULL; } @@ -2188,12 +2195,19 @@ _item_del_pre_fx_process(Elm_Gen_Item *it) if (!eina_list_data_find(GG_IT(it)->wsd->pending_del_items, it)) GG_IT(it)->wsd->pending_del_items = eina_list_append(GG_IT(it)->wsd->pending_del_items, it); - evas_event_freeze(evas_object_evas_get(obj)); - GG_IT(it)->wsd->selected = eina_list_remove(GG_IT(it)->wsd->selected, it); + evas_object_event_callback_del_full + (VIEW(it), EVAS_CALLBACK_MOUSE_DOWN, _item_mouse_down_cb, it); + evas_object_event_callback_del_full + (VIEW(it), EVAS_CALLBACK_MOUSE_UP, _item_mouse_up_cb, it); + evas_object_event_callback_del_full + (VIEW(it), EVAS_CALLBACK_MOUSE_MOVE, _item_mouse_move_cb, it); - _elm_gengrid_item_del_common(it); - evas_event_thaw(evas_object_evas_get(obj)); - evas_event_thaw_eval(evas_object_evas_get(obj)); + GG_IT(it)->wsd->items = eina_inlist_remove + (GG_IT(it)->wsd->items, EINA_INLIST_GET(it)); + + if (GG_IT(it)->wsd->calc_job) ecore_job_del(GG_IT(it)->wsd->calc_job); + GG_IT(it)->wsd->calc_job = + ecore_job_add(GG_IT(it)->wsd->calc_cb, GG_IT(it)->wsd); } #endif @@ -2273,11 +2287,13 @@ _elm_gengrid_clear(Evas_Object *obj, EINA_LIST_FREE(sd->capture_before_items, pi) { + if (pi->proxy) evas_object_smart_member_del(pi->proxy); if (pi->proxy) evas_object_del(pi->proxy); free(pi); } EINA_LIST_FREE(sd->capture_after_items, pi) { + if (pi->proxy) evas_object_smart_member_del(pi->proxy); if (pi->proxy) evas_object_del(pi->proxy); free(pi); } @@ -2287,7 +2303,10 @@ _elm_gengrid_clear(Evas_Object *obj, free(fi); } EINA_LIST_FREE (sd->pending_unrealized_items, it) - _elm_gengrid_item_unrealize(it, EINA_FALSE); + { + if ((it) && (GG_IT(it))) GG_IT(it)->has_proxy_it = EINA_FALSE; + _elm_gengrid_item_unrealize(it, EINA_FALSE); + } EINA_LIST_FREE (sd->pending_del_items, it) { _item_del(it); @@ -3746,7 +3765,8 @@ _elm_gengrid_proxy_item_new(const Elm_Object_Item *item) (evas_object_evas_get(ELM_WIDGET_DATA(GG_IT(it)->wsd)->obj)); if (!pi->proxy) return EINA_FALSE; evas_object_clip_set(pi->proxy, evas_object_clip_get(GG_IT(it)->wsd->pan_obj)); - + evas_object_smart_member_add(pi->proxy, GG_IT(it)->wsd->pan_obj); + evas_object_hide(pi->proxy); evas_object_image_source_set(pi->proxy, VIEW(it)); GG_IT(it)->has_proxy_it = EINA_TRUE; @@ -3789,6 +3809,7 @@ _elm_gengrid_fx_capture(Evas_Object *obj, int level) sd->fx_first_captured = EINA_TRUE; EINA_LIST_FREE(sd->capture_before_items, pi) { + if (pi->proxy) evas_object_smart_member_del(pi->proxy); if (pi->proxy) evas_object_del(pi->proxy); free(pi); } @@ -3797,6 +3818,7 @@ _elm_gengrid_fx_capture(Evas_Object *obj, int level) { EINA_LIST_FREE(sd->capture_after_items, pi) { + if (pi->proxy) evas_object_smart_member_del(pi->proxy); if (pi->proxy) evas_object_del(pi->proxy); free(pi); } @@ -3944,6 +3966,8 @@ _item_fx_del_cb(void *data, Elm_Transit *transit __UNUSED__) { Elm_Gen_FX_Item *fx_done_it = data; Elm_Gen_Item *it = NULL; + Proxy_Item *pi = NULL; + Eina_List *l; Elm_Gengrid_Smart_Data *sd = GG_IT(fx_done_it->it)->wsd; if ((!fx_done_it) || (!fx_done_it->it) || (!sd)) return; @@ -3964,6 +3988,10 @@ _item_fx_del_cb(void *data, Elm_Transit *transit __UNUSED__) _item_del(it); _elm_widget_item_free((Elm_Widget_Item *)it); } + EINA_LIST_FOREACH(sd->capture_before_items, l, pi) + evas_object_hide(pi->proxy); + EINA_LIST_FOREACH(sd->capture_after_items, l, pi) + evas_object_hide(pi->proxy); sd->fx_playing = EINA_FALSE; sd->fx_first_captured = EINA_FALSE; diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index b471ef1..309cdc2 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -185,6 +185,10 @@ _item_cache_push(Elm_Gen_Item *it) Elm_Genlist_Smart_Data *sd = GL_IT(it)->wsd; Item_Cache *ic = NULL; +#if GENLIST_FX_SUPPORT + if (sd->pending_del_items) return; +#endif + if (sd->item_cache_count >= sd->item_cache_max) { ic = EINA_INLIST_CONTAINER_GET(sd->item_cache->last, Item_Cache); @@ -7255,7 +7259,8 @@ _elm_genlist_fx_item_prev_get(const Elm_Object_Item *item) { Elm_Gen_Item *it; it = (Elm_Gen_Item *)item; - if ((!it) || (IS_ROOT_PARENT_IT(it))) return NULL; + if (!it) return NULL; + if (GL_IT(it)->wsd->pinch_zoom_mode) return NULL; while (it) { @@ -7352,7 +7357,7 @@ _elm_genlist_fx_items_make(Evas_Object *obj) EINA_LIST_FOREACH(sd->fx_items, l, fi) { - if (IS_ROOT_PARENT_IT(fi->it)) + if ((GL_IT(fi->it)->items) && (GL_IT(fi->it)->expanded_depth == 0)) { #if GENLIST_PINCH_ZOOM_SUPPORT if (sd->pinch_zoom_mode == ELM_GEN_PINCH_ZOOM_CONTRACT) @@ -7364,7 +7369,6 @@ _elm_genlist_fx_items_make(Evas_Object *obj) { if (sd->realized_top_item) { - if (fi->num <= sd->realized_top_item->item->num) fi->to.y = oy - fi->from.h; else diff --git a/src/lib/elm_widget.c b/src/lib/elm_widget.c index fcb9ff6..b28123d 100644 --- a/src/lib/elm_widget.c +++ b/src/lib/elm_widget.c @@ -419,41 +419,6 @@ _smart_add(Evas_Object *obj) } } -static Evas_Object * -_newest_focus_order_get(Evas_Object *obj, - unsigned int *newest_focus_order, - Eina_Bool can_focus_only) -{ - const Eina_List *l; - Evas_Object *child, *ret, *best; - - API_ENTRY return NULL; - - if (!evas_object_visible_get(obj) - || (elm_widget_disabled_get(obj)) - || (elm_widget_tree_unfocusable_get(obj))) - return NULL; - - best = NULL; - if (*newest_focus_order < sd->focus_order) - { - *newest_focus_order = sd->focus_order; - best = obj; - } - EINA_LIST_FOREACH(sd->subobjs, l, child) - { - ret = _newest_focus_order_get - (child, newest_focus_order, can_focus_only); - if (!ret) continue; - best = ret; - } - if (can_focus_only) - { - if ((!best) || (!elm_widget_can_focus_get(best))) - return NULL; - } - return best; -} static void _if_focused_revert(Evas_Object *obj, @@ -471,8 +436,8 @@ _if_focused_revert(Evas_Object *obj, top = elm_widget_top_get(sd->parent_obj); if (top) { - newest = _newest_focus_order_get - (top, &newest_focus_order, can_focus_only); + newest = elm_widget_newest_focus_order_get + (top, &newest_focus_order, can_focus_only); if (newest) { elm_object_focus_set(newest, EINA_FALSE); @@ -2740,7 +2705,7 @@ elm_widget_focus_restore(Evas_Object *obj) unsigned int newest_focus_order = 0; API_ENTRY return; - newest = _newest_focus_order_get(obj, &newest_focus_order, EINA_TRUE); + newest = elm_widget_newest_focus_order_get(obj, &newest_focus_order, EINA_TRUE); if (newest) { elm_object_focus_set(newest, EINA_FALSE); @@ -3667,6 +3632,42 @@ elm_widget_focus_order_get(const Evas_Object *obj) return sd->focus_order; } +EAPI Evas_Object * +elm_widget_newest_focus_order_get(const Evas_Object *obj, + unsigned int *newest_focus_order, + Eina_Bool can_focus_only) +{ + const Eina_List *l; + Evas_Object *child, *ret, *best; + + API_ENTRY return NULL; + + if (!evas_object_visible_get(obj) + || (elm_widget_disabled_get(obj)) + || (elm_widget_tree_unfocusable_get(obj))) + return NULL; + + best = NULL; + if (*newest_focus_order < sd->focus_order) + { + *newest_focus_order = sd->focus_order; + best = (Evas_Object *)obj; + } + EINA_LIST_FOREACH(sd->subobjs, l, child) + { + ret = elm_widget_newest_focus_order_get + (child, newest_focus_order, can_focus_only); + if (!ret) continue; + best = ret; + } + if (can_focus_only) + { + if ((!best) || (!elm_widget_can_focus_get(best))) + return NULL; + } + return best; +} + EAPI void elm_widget_activate(Evas_Object *obj, Elm_Activate act) { diff --git a/src/lib/elm_widget.h b/src/lib/elm_widget.h index a93c620..4622982 100644 --- a/src/lib/elm_widget.h +++ b/src/lib/elm_widget.h @@ -778,6 +778,7 @@ EAPI void elm_widget_focus_mouse_up_handle(Evas_Object *obj); EAPI void elm_widget_focus_tree_unfocusable_handle(Evas_Object *obj); EAPI void elm_widget_focus_disabled_handle(Evas_Object *obj); EAPI unsigned int elm_widget_focus_order_get(const Evas_Object *obj); +EAPI Evas_Object *elm_widget_newest_focus_order_get(const Evas_Object *obj, unsigned int *newest_focus_order, Eina_Bool can_focus_only); EAPI void elm_widget_activate(Evas_Object *obj, Elm_Activate act); EAPI void elm_widget_text_part_set(Evas_Object *obj, const char *part, const char *label); EAPI const char *elm_widget_text_part_get(const Evas_Object *obj, const char *part); diff --git a/src/lib/elm_widget_naviframe.h b/src/lib/elm_widget_naviframe.h index 9e85773..b9da63f 100644 --- a/src/lib/elm_widget_naviframe.h +++ b/src/lib/elm_widget_naviframe.h @@ -157,7 +157,7 @@ struct _Elm_Naviframe_Item Evas_Coord minh; Eina_Bool title_visible : 1; - Eina_Bool content_unfocusable : 1; + Eina_Bool unfocusable : 1; }; typedef struct _Elm_Naviframe_Content_Item_Pair Elm_Naviframe_Content_Item_Pair; diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c index bc03612..f4a35da 100755 --- a/src/lib/elm_win.c +++ b/src/lib/elm_win.c @@ -92,7 +92,6 @@ struct _Elm_Win_Smart_Data } shot; int resize_location; int *autodel_clear, rot; - int show_count; struct { int x, y; @@ -829,16 +828,17 @@ _elm_win_focus_in(Ecore_Evas *ee) { Elm_Win_Smart_Data *sd = _elm_win_associate_get(ee); Evas_Object *obj; + unsigned int order = 0; EINA_SAFETY_ON_NULL_RETURN(sd); obj = ELM_WIDGET_DATA(sd)->obj; _elm_widget_top_win_focused_set(obj, EINA_TRUE); - if (!elm_widget_focus_order_get(obj)) + if (!elm_widget_focus_order_get(obj) + || (obj == elm_widget_newest_focus_order_get(obj, &order, EINA_TRUE))) { elm_widget_focus_steal(obj); - sd->show_count++; } else elm_widget_focus_restore(obj); @@ -1197,7 +1197,6 @@ _elm_win_smart_show(Evas_Object *obj) TRAP(sd, show); - if (!sd->show_count) sd->show_count++; if (sd->shot.info) _shot_handle(sd); } diff --git a/src/modules/ctxpopup_copypasteUI/copypaste.c b/src/modules/ctxpopup_copypasteUI/copypaste.c index a076f67..b373562 100644 --- a/src/modules/ctxpopup_copypasteUI/copypaste.c +++ b/src/modules/ctxpopup_copypasteUI/copypaste.c @@ -336,10 +336,18 @@ _item_clicked(void *data, Evas_Object *obj, void *event_info) } static void -_ctxpopup_dismissed_cb(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__) +_ctxpopup_dismissed_cb(void *data, Evas_Object *obj, void *event_info __UNUSED__) { + Elm_Ctxpopup_Direction dir; if (!ext_mod) return; + dir = elm_ctxpopup_direction_get(obj); + //clear selection if ctxpopup is dismissed by clicking (not parent resizing) + if (dir != ELM_CTXPOPUP_DIRECTION_UNKNOWN) + { + elm_entry_select_none(data); + } + //elm_object_scroll_freeze_pop(ext_mod->popup); } @@ -410,7 +418,7 @@ obj_longpress(Evas_Object *obj) { ext_mod->popup = elm_ctxpopup_add(top); elm_object_tree_focus_allow_set(ext_mod->popup, EINA_FALSE); - evas_object_smart_callback_add(ext_mod->popup, "dismissed", _ctxpopup_dismissed_cb, NULL); + evas_object_smart_callback_add(ext_mod->popup, "dismissed", _ctxpopup_dismissed_cb, obj); evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL, _entry_del_cb, ext_mod->popup); evas_object_event_callback_add(obj, EVAS_CALLBACK_HIDE, _entry_hide_cb, ext_mod->popup); }