Efl.Input: Reset the Efl.Input object as soon as possible.

By doing this the pd->device reference is unrefed and deleted
if no one else is holding a reference to it.
This commit is contained in:
Guilherme Iscaro 2016-12-01 16:12:37 -02:00 committed by Bruno Dilly
parent 04450c4ee0
commit 826cd7cb5e
3 changed files with 3 additions and 3 deletions

View File

@ -25,6 +25,7 @@ _del_hook(Eo *evt)
}
efl_reuse(evt);
s_cached_event = evt;
efl_input_reset(s_cached_event);
}
else
{
@ -136,7 +137,6 @@ _efl_input_focus_efl_input_event_instance_get(Eo *klass EINA_UNUSED, void *_pd E
{
evt = s_cached_event;
s_cached_event = NULL;
efl_input_reset(evt);
efl_parent_set(evt, owner);
}
else

View File

@ -25,6 +25,7 @@ _del_hook(Eo *evt)
}
efl_reuse(evt);
s_cached_event = evt;
efl_input_reset(s_cached_event);
}
else
{
@ -44,7 +45,6 @@ _efl_input_key_efl_input_event_instance_get(Eo *klass EINA_UNUSED, void *_pd EIN
{
evt = s_cached_event;
s_cached_event = NULL;
efl_input_reset(evt);
efl_parent_set(evt, owner);
}
else

View File

@ -36,6 +36,7 @@ _del_hook(Eo *evt)
}
efl_reuse(evt);
s_cached_event = evt;
efl_input_reset(s_cached_event);
}
else
{
@ -55,7 +56,6 @@ _efl_input_pointer_efl_input_event_instance_get(Eo *klass EINA_UNUSED, void *_pd
{
evt = s_cached_event;
s_cached_event = NULL;
efl_input_reset(evt);
efl_parent_set(evt, owner);
}
else