summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Foreman <derek.foreman.samsung@gmail.com>2019-01-10 15:56:56 -0600
committerDerek Foreman <derek.foreman.samsung@gmail.com>2019-01-15 13:47:16 -0600
commit625955a597a66e81a2f226151a436902ea39c3f0 (patch)
tree05b8f37dac4351f1c13b1395dceea6fa139db3cb
parentea9ff9f547b54255d36973da8e8ba378c5ad2684 (diff)
downloadefl-625955a597a66e81a2f226151a436902ea39c3f0.tar.gz
ecore_evas: Don't walk mice list twice
We know the item is in there, so we can remove it directly. Signed-off-by: Derek Foreman <derek.foreman.samsung@gmail.com> Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D7609
-rw-r--r--src/lib/ecore_evas/ecore_evas.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index 14c3792036..cbd3107fa3 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -5172,14 +5172,14 @@ EAPI void
_ecore_evas_mouse_inout_set(Ecore_Evas *ee, Efl_Input_Device *mouse,
Eina_Bool in, Eina_Bool force_out)
{
- Efl_Input_Device *present;
+ Eina_List *present;
if (!mouse)
mouse = evas_default_device_get(ee->evas,
EFL_INPUT_DEVICE_TYPE_MOUSE);;
EINA_SAFETY_ON_NULL_RETURN(mouse);
- present = eina_list_data_find(ee->mice_in, mouse);
+ present = eina_list_data_find_list(ee->mice_in, mouse);
if (in)
{
@@ -5191,7 +5191,7 @@ _ecore_evas_mouse_inout_set(Ecore_Evas *ee, Efl_Input_Device *mouse,
}
else
{
- if (present) ee->mice_in = eina_list_remove(ee->mice_in, mouse);
+ if (present) ee->mice_in = eina_list_remove_list(ee->mice_in, present);
else if (!present && !force_out) return;
efl_event_callback_del(mouse, EFL_EVENT_DEL,
_ecore_evas_mouse_del_cb, ee);