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)
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,
294 Evas_Object *obj EINA_UNUSED, 294 Evas_Object *obj EINA_UNUSED,
295 void *event_info) 295 void *event_info)
296{ 296{
297 Evas_Object *top;
298
297 ELM_WIDGET_DATA_GET(data, sd); 299 ELM_WIDGET_DATA_GET(data, sd);
298 Evas_Event_Mouse_Down *ev = event_info; 300 Evas_Event_Mouse_Down *ev = event_info;
299 if (!(ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD)) 301 if ((ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD)) return;
300 sd->still_in = EINA_TRUE; 302
303 top = elm_widget_top_get(data);
304 if (top && efl_isa(top, EFL_UI_WIN_CLASS)) _elm_win_focus_auto_hide(top);
305 sd->still_in = EINA_TRUE;
301} 306}
302 307
303static void 308static void
@@ -4059,12 +4064,9 @@ elm_widget_focus_mouse_up_handle(Evas_Object *obj)
4059EOLIAN static void 4064EOLIAN static void
4060_elm_widget_focus_mouse_up_handle(Eo *obj, Elm_Widget_Smart_Data *_pd EINA_UNUSED) 4065_elm_widget_focus_mouse_up_handle(Eo *obj, Elm_Widget_Smart_Data *_pd EINA_UNUSED)
4061{ 4066{
4062 Evas_Object *top;
4063
4064 if (!obj) return; 4067 if (!obj) return;
4065 if (!_is_focusable(obj)) return; 4068 if (!_is_focusable(obj)) return;
4066 top = elm_widget_top_get(obj); 4069
4067 if (top && efl_isa(top, EFL_UI_WIN_CLASS)) _elm_win_focus_auto_hide(top);
4068 elm_widget_focus_steal(obj, NULL); 4070 elm_widget_focus_steal(obj, NULL);
4069} 4071}
4070 4072