summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hirt <hirt.danny@gmail.com>2018-07-12 18:16:03 +0300
committerDaniel Hirt <hirt.danny@gmail.com>2018-07-13 09:24:00 +0300
commite9925e609f3648736107e0545fb68cc45012421f (patch)
tree5edf190ea2d0b32ac79736bc3978b7c5a75d1926
parent92820dbb884c707b59749d98d58f75b535fcf33e (diff)
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
-rw-r--r--src/lib/elementary/efl_selection_manager.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/lib/elementary/efl_selection_manager.c b/src/lib/elementary/efl_selection_manager.c
index 95d22f04bb..24132d44fb 100644
--- a/src/lib/elementary/efl_selection_manager.c
+++ b/src/lib/elementary/efl_selection_manager.c
@@ -4988,22 +4988,24 @@ _efl_selection_manager_drop_target_del(Eo *obj EINA_UNUSED, Efl_Selection_Manage
4988 } 4988 }
4989 } 4989 }
4990 4990
4991 if (!pd->drop_list) return;
4992#ifdef HAVE_ELEMENTARY_X 4991#ifdef HAVE_ELEMENTARY_X
4993 Eina_List *l; 4992 if (pd->drop_list)
4994 Ecore_X_Window xwin;
4995 Eina_Bool have_drop_list = EINA_FALSE;
4996
4997 xwin = _x11_xwin_get(target_obj);
4998 EINA_LIST_FOREACH(pd->drop_list, l, dropable)
4999 { 4993 {
5000 if (xwin == _x11_xwin_get(dropable->obj)) 4994 Eina_List *l;
4995 Ecore_X_Window xwin;
4996 Eina_Bool have_drop_list = EINA_FALSE;
4997
4998 xwin = _x11_xwin_get(target_obj);
4999 EINA_LIST_FOREACH(pd->drop_list, l, dropable)
5001 { 5000 {
5002 have_drop_list = EINA_TRUE; 5001 if (xwin == _x11_xwin_get(dropable->obj))
5003 break; 5002 {
5003 have_drop_list = EINA_TRUE;
5004 break;
5005 }
5004 } 5006 }
5007 if (!have_drop_list) ecore_x_dnd_aware_set(xwin, EINA_FALSE);
5005 } 5008 }
5006 if (!have_drop_list) ecore_x_dnd_aware_set(xwin, EINA_FALSE);
5007#endif 5009#endif
5008 seat_sel = _sel_manager_seat_selection_init(pd, seat); 5010 seat_sel = _sel_manager_seat_selection_init(pd, seat);
5009 ELM_SAFE_FREE(seat_sel->pos_handler, ecore_event_handler_del); 5011 ELM_SAFE_FREE(seat_sel->pos_handler, ecore_event_handler_del);