Selection manager: properly clean in drop_target_del

Summary:
The last lines in _efl_selection_manager_drop_target_del were skipped
when `!pd->drop_list` was met. These lines clear the selection event
handlers. Thus, events kept firing and causing erratic behavior.

Fixes T7130

Subscribers: cedric, #committers, zmike

Tags: #efl

Maniphest Tasks: T7130

Differential Revision: https://phab.enlightenment.org/D6579
This commit is contained in:
Daniel Hirt 2018-07-12 18:16:03 +03:00
parent 92820dbb88
commit e9925e609f
1 changed files with 13 additions and 11 deletions

View File

@ -4988,8 +4988,9 @@ _efl_selection_manager_drop_target_del(Eo *obj EINA_UNUSED, Efl_Selection_Manage
}
}
if (!pd->drop_list) return;
#ifdef HAVE_ELEMENTARY_X
if (pd->drop_list)
{
Eina_List *l;
Ecore_X_Window xwin;
Eina_Bool have_drop_list = EINA_FALSE;
@ -5004,6 +5005,7 @@ _efl_selection_manager_drop_target_del(Eo *obj EINA_UNUSED, Efl_Selection_Manage
}
}
if (!have_drop_list) ecore_x_dnd_aware_set(xwin, EINA_FALSE);
}
#endif
seat_sel = _sel_manager_seat_selection_init(pd, seat);
ELM_SAFE_FREE(seat_sel->pos_handler, ecore_event_handler_del);