summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWooHyun Jung <wh0705.jung@samsung.com>2016-08-27 13:48:35 +0900
committerWooHyun Jung <wh0705.jung@samsung.com>2016-08-27 13:48:35 +0900
commitd553a5a836d73927569d3449aeaa5e33f82663b6 (patch)
tree63289bf10189be4988053e1a92da6d225db2ed59
parent6256978b61ca1ecf0bcc29ead3729c8c6484421e (diff)
downloadefl-d553a5a836d73927569d3449aeaa5e33f82663b6.tar.gz
elm focus: focus_auto_hide should be done with mouse_down
Focus highlight can be on the air, when focused object in scroller is moved by mouse down and move. So, mouse up is not proper for executing focus_auto_hide. @fix
-rw-r--r--src/lib/elementary/elm_widget.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c
index b73661c14b..136d67f9db 100644
--- a/src/lib/elementary/elm_widget.c
+++ b/src/lib/elementary/elm_widget.c
@@ -294,10 +294,15 @@ _obj_mouse_down(void *data,
Evas_Object *obj EINA_UNUSED,
void *event_info)
{
+ Evas_Object *top;
+
ELM_WIDGET_DATA_GET(data, sd);
Evas_Event_Mouse_Down *ev = event_info;
- if (!(ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD))
- sd->still_in = EINA_TRUE;
+ if ((ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD)) return;
+
+ top = elm_widget_top_get(data);
+ if (top && efl_isa(top, EFL_UI_WIN_CLASS)) _elm_win_focus_auto_hide(top);
+ sd->still_in = EINA_TRUE;
}
static void
@@ -4059,12 +4064,9 @@ elm_widget_focus_mouse_up_handle(Evas_Object *obj)
EOLIAN static void
_elm_widget_focus_mouse_up_handle(Eo *obj, Elm_Widget_Smart_Data *_pd EINA_UNUSED)
{
- Evas_Object *top;
-
if (!obj) return;
if (!_is_focusable(obj)) return;
- top = elm_widget_top_get(obj);
- if (top && efl_isa(top, EFL_UI_WIN_CLASS)) _elm_win_focus_auto_hide(top);
+
elm_widget_focus_steal(obj, NULL);
}