forked from enlightenment/enlightenment
add extra param to e_bindings_key_down_event_find() to return found binding
this should match the corresponding mouse binding function
This commit is contained in:
parent
6d45baa510
commit
c637c70f1c
|
@ -709,7 +709,7 @@ e_bindings_key_up_event_handle(E_Binding_Context ctxt, E_Object *obj, Ecore_Even
|
|||
}
|
||||
|
||||
E_API E_Action *
|
||||
e_bindings_key_down_event_find(E_Binding_Context ctxt, Ecore_Event_Key *ev)
|
||||
e_bindings_key_down_event_find(E_Binding_Context ctxt, Ecore_Event_Key *ev, E_Binding_Key **bind_ret)
|
||||
{
|
||||
E_Binding_Modifier mod = 0;
|
||||
E_Binding_Key *binding;
|
||||
|
@ -726,6 +726,8 @@ e_bindings_key_down_event_find(E_Binding_Context ctxt, Ecore_Event_Key *ev)
|
|||
E_Action *act;
|
||||
|
||||
act = e_action_find(binding->action);
|
||||
if (!act) continue;
|
||||
if (bind_ret) *bind_ret = binding;
|
||||
return act;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -161,7 +161,7 @@ E_API void e_bindings_key_grab(E_Binding_Context ctxt, Ecore_X_Window win
|
|||
E_API void e_bindings_key_ungrab(E_Binding_Context ctxt, Ecore_X_Window win);
|
||||
E_API E_Action *e_bindings_key_down_event_handle(E_Binding_Context ctxt, E_Object *obj, Ecore_Event_Key *ev);
|
||||
E_API E_Action *e_bindings_key_up_event_handle(E_Binding_Context ctxt, E_Object *obj, Ecore_Event_Key *ev);
|
||||
E_API E_Action *e_bindings_key_down_event_find(E_Binding_Context ctxt, Ecore_Event_Key *ev);
|
||||
E_API E_Action *e_bindings_key_down_event_find(E_Binding_Context ctxt, Ecore_Event_Key *ev, E_Binding_Key **bind_ret);
|
||||
E_API E_Action *e_bindings_key_up_event_find(E_Binding_Context ctxt, Ecore_Event_Key *ev);
|
||||
|
||||
E_API Eina_Bool e_bindings_key_allowed(const char *key);
|
||||
|
|
|
@ -390,7 +390,7 @@ _cb_key_down(EINA_UNUSED void *data, Ecore_Event_Key *ev)
|
|||
t = ecore_loop_time_get();
|
||||
if (t - show_time > 0.5)
|
||||
{
|
||||
act = e_bindings_key_down_event_find(E_BINDING_CONTEXT_ANY, ev);
|
||||
act = e_bindings_key_down_event_find(E_BINDING_CONTEXT_ANY, ev, NULL);
|
||||
if ((act) && (act->name))
|
||||
{
|
||||
if (!strcmp(act->name, "syscon"))
|
||||
|
|
Loading…
Reference in New Issue