set ON_HOLD flag more accurately when activating gadget actions

fixes handling of actions which have same binding as gadget site's container bindings
This commit is contained in:
Mike Blumenkrantz 2016-10-19 11:13:32 -04:00
parent 39d561c8b4
commit e690d70512
1 changed files with 7 additions and 2 deletions

View File

@ -900,11 +900,16 @@ _site_mouse_down(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_
E_Gadget_Config *zgc;
E_Action *act;
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
zgc = _gadget_at_xy(zgs, ev->output.x, ev->output.y, NULL);
if (!zgc) return;
act = e_bindings_mouse_down_evas_event_handle(E_BINDING_CONTEXT_ANY, zgc->e_obj_inherit, event_info);
if (!act) return;
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
act = e_bindings_mouse_down_evas_event_handle(E_BINDING_CONTEXT_ANY, zgc->e_obj_inherit, event_info);
if (!act)
{
ev->event_flags &= ~EVAS_EVENT_FLAG_ON_HOLD;
return;
}
if (act->func.end_mouse)
{
int x, y;