summaryrefslogtreecommitdiff
path: root/src/lib/ecore_evas/ecore_evas.c
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 /src/lib/ecore_evas/ecore_evas.c
parentea9ff9f547b54255d36973da8e8ba378c5ad2684 (diff)
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
Diffstat (limited to 'src/lib/ecore_evas/ecore_evas.c')
-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 14c3792..cbd3107 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -5172,14 +5172,14 @@ EAPI void
5172_ecore_evas_mouse_inout_set(Ecore_Evas *ee, Efl_Input_Device *mouse, 5172_ecore_evas_mouse_inout_set(Ecore_Evas *ee, Efl_Input_Device *mouse,
5173 Eina_Bool in, Eina_Bool force_out) 5173 Eina_Bool in, Eina_Bool force_out)
5174{ 5174{
5175 Efl_Input_Device *present; 5175 Eina_List *present;
5176 5176
5177 if (!mouse) 5177 if (!mouse)
5178 mouse = evas_default_device_get(ee->evas, 5178 mouse = evas_default_device_get(ee->evas,
5179 EFL_INPUT_DEVICE_TYPE_MOUSE);; 5179 EFL_INPUT_DEVICE_TYPE_MOUSE);;
5180 5180
5181 EINA_SAFETY_ON_NULL_RETURN(mouse); 5181 EINA_SAFETY_ON_NULL_RETURN(mouse);
5182 present = eina_list_data_find(ee->mice_in, mouse); 5182 present = eina_list_data_find_list(ee->mice_in, mouse);
5183 5183
5184 if (in) 5184 if (in)
5185 { 5185 {
@@ -5191,7 +5191,7 @@ _ecore_evas_mouse_inout_set(Ecore_Evas *ee, Efl_Input_Device *mouse,
5191 } 5191 }
5192 else 5192 else
5193 { 5193 {
5194 if (present) ee->mice_in = eina_list_remove(ee->mice_in, mouse); 5194 if (present) ee->mice_in = eina_list_remove_list(ee->mice_in, present);
5195 else if (!present && !force_out) return; 5195 else if (!present && !force_out) return;
5196 efl_event_callback_del(mouse, EFL_EVENT_DEL, 5196 efl_event_callback_del(mouse, EFL_EVENT_DEL,
5197 _ecore_evas_mouse_del_cb, ee); 5197 _ecore_evas_mouse_del_cb, ee);