forked from enlightenment/efl
Fix event propagation in elementary.
Need set ON_HOLD, and check it. SVN revision: 53194
This commit is contained in:
parent
7b9804f31a
commit
9ff54ffc12
|
@ -204,7 +204,7 @@ _propagate_event(void *data, Evas *e __UNUSED__, Evas_Object *obj, void *event_i
|
|||
INTERNAL_ENTRY;
|
||||
Evas_Callback_Type type = (Evas_Callback_Type)(long) data;
|
||||
Evas_Event_Flags *event_flags = NULL;
|
||||
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case EVAS_CALLBACK_KEY_DOWN:
|
||||
|
@ -222,14 +222,14 @@ _propagate_event(void *data, Evas *e __UNUSED__, Evas_Object *obj, void *event_i
|
|||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (event_flags && (*event_flags & EVAS_EVENT_FLAG_ON_HOLD))
|
||||
|
||||
if (event_flags && ((*event_flags) & EVAS_EVENT_FLAG_ON_HOLD))
|
||||
return;
|
||||
|
||||
|
||||
if (sd->event_func && sd->event_func(obj, obj, type, event_info))
|
||||
return;
|
||||
|
||||
elm_widget_parent_event_propagate(obj, type, event_info);
|
||||
|
||||
elm_widget_parent_event_propagate(obj, type, event_info, event_flags);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -736,11 +736,13 @@ elm_widget_parent_widget_get(const Evas_Object *obj)
|
|||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
elm_widget_parent_event_propagate(Evas_Object *obj, Evas_Callback_Type type, void *event_info)
|
||||
elm_widget_parent_event_propagate(Evas_Object *obj, Evas_Callback_Type type, void *event_info, Evas_Event_Flags *event_flags)
|
||||
{
|
||||
API_ENTRY return EINA_FALSE;
|
||||
Evas_Object *parent = sd->parent_obj;
|
||||
while (parent)
|
||||
|
||||
while (parent &&
|
||||
(!(event_flags && ((*event_flags) & EVAS_EVENT_FLAG_ON_HOLD))))
|
||||
{
|
||||
sd = evas_object_smart_data_get(parent);
|
||||
if ((!sd) || (!_elm_widget_is(obj)))
|
||||
|
|
|
@ -250,7 +250,7 @@ EAPI Evas_Object *elm_widget_focused_object_get(const Evas_Object *obj);
|
|||
EAPI Evas_Object *elm_widget_top_get(const Evas_Object *obj);
|
||||
EAPI Eina_Bool elm_widget_is(const Evas_Object *obj);
|
||||
EAPI Evas_Object *elm_widget_parent_widget_get(const Evas_Object *obj);
|
||||
EAPI Eina_Bool elm_widget_parent_event_propagate(Evas_Object *obj, Evas_Callback_Type type, void *event_info);
|
||||
EAPI Eina_Bool elm_widget_parent_event_propagate(Evas_Object *obj, Evas_Callback_Type type, void *event_info, Evas_Event_Flags *event_flags);
|
||||
EAPI void elm_widget_focus_custom_chain_set(Evas_Object *obj, Eina_List *objs);
|
||||
EAPI void elm_widget_focus_custom_chain_unset(Evas_Object *obj);
|
||||
EAPI const Eina_List *elm_widget_focus_custom_chain_get(const Evas_Object *obj);
|
||||
|
|
|
@ -173,6 +173,7 @@ _elm_win_event_cb(Evas_Object *obj, Evas_Object *src, Evas_Callback_Type type, v
|
|||
elm_widget_focus_cycle(obj, ELM_FOCUS_PREVIOUS);
|
||||
else
|
||||
elm_widget_focus_cycle(obj, ELM_FOCUS_NEXT);
|
||||
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
|
||||
return EINA_TRUE;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue