evas: Set locks and modifiers for all input events

See also eb27724eb9 which didn't fix
the reported issue. Not quite sure yet how to implement those
lock & modifiers for fake events (i.e. artificially created
by the app itself).

Fixes T5510
This commit is contained in:
Jean-Philippe Andre 2017-06-07 14:53:08 +09:00
parent 52bced7f0f
commit 6329111385
2 changed files with 19 additions and 1 deletions

View File

@ -41,6 +41,7 @@ _efl_input_key_efl_input_event_instance_get(Eo *klass EINA_UNUSED, void *_pd EIN
{
Efl_Input_Key_Data *ev;
Efl_Input_Key *evt;
Evas *evas;
if (s_cached_event)
{
@ -58,6 +59,14 @@ _efl_input_key_efl_input_event_instance_get(Eo *klass EINA_UNUSED, void *_pd EIN
ev->fake = EINA_FALSE;
if (priv) *priv = ev;
evas = efl_provider_find(owner, EVAS_CANVAS_CLASS);
if (evas)
{
Evas_Public_Data *e = efl_data_scope_get(evas, EVAS_CANVAS_CLASS);
ev->modifiers = &e->modifiers;
ev->locks = &e->locks;
}
return evt;
}

View File

@ -48,10 +48,11 @@ _del_hook(Eo *evt)
EOLIAN static Efl_Input_Pointer *
_efl_input_pointer_efl_input_event_instance_get(Eo *klass EINA_UNUSED, void *_pd EINA_UNUSED,
Eo *owner, void **priv)
Eo *owner, void **priv)
{
Efl_Input_Pointer_Data *ev;
Efl_Input_Pointer *evt;
Evas *evas;
if (s_cached_event)
{
@ -69,6 +70,14 @@ _efl_input_pointer_efl_input_event_instance_get(Eo *klass EINA_UNUSED, void *_pd
ev->fake = EINA_FALSE;
if (priv) *priv = ev;
evas = efl_provider_find(owner, EVAS_CANVAS_CLASS);
if (evas)
{
Evas_Public_Data *e = efl_data_scope_get(evas, EVAS_CANVAS_CLASS);
ev->modifiers = &e->modifiers;
ev->locks = &e->locks;
}
return evt;
}