mbe: Fix infinite recursion on focus change

Ref D4882
This commit is contained in:
Jean-Philippe Andre 2017-08-31 14:14:50 +09:00
parent 5eb001dd35
commit 71824e1fe0
2 changed files with 7 additions and 1 deletions

View File

@ -350,6 +350,9 @@ _elm_multibuttonentry_elm_widget_on_focus(Eo *obj, Elm_Multibuttonentry_Data *sd
{ {
if (elm_widget_focus_get(obj)) if (elm_widget_focus_get(obj))
{ {
if (sd->focused) goto end;
sd->focused = EINA_TRUE;
// ACCESS // ACCESS
if (_elm_config->access_mode == ELM_ACCESS_MODE_ON) goto end; if (_elm_config->access_mode == ELM_ACCESS_MODE_ON) goto end;
@ -373,6 +376,9 @@ _elm_multibuttonentry_elm_widget_on_focus(Eo *obj, Elm_Multibuttonentry_Data *sd
} }
else else
{ {
if (sd->focused) goto end;
sd->focused = EINA_FALSE;
if (sd->editable) if (sd->editable)
{ {
_view_update(sd); _view_update(sd);

View File

@ -104,7 +104,7 @@ struct _Elm_Multibuttonentry_Data
Eina_Bool last_it_select : 1; Eina_Bool last_it_select : 1;
Eina_Bool editable : 1; Eina_Bool editable : 1;
Eina_Bool focused : 1; Eina_Bool focused : 1; // avoids infinite loop on focus in/out
Eina_Bool label_packed : 1; Eina_Bool label_packed : 1;
Ecore_Timer *longpress_timer; Ecore_Timer *longpress_timer;