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)
downloadefl-e9925e609f3648736107e0545fb68cc45012421f.tar.gz
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
}
}
- if (!pd->drop_list) return;
#ifdef HAVE_ELEMENTARY_X
- Eina_List *l;
- Ecore_X_Window xwin;
- Eina_Bool have_drop_list = EINA_FALSE;
-
- xwin = _x11_xwin_get(target_obj);
- EINA_LIST_FOREACH(pd->drop_list, l, dropable)
+ if (pd->drop_list)
{
- if (xwin == _x11_xwin_get(dropable->obj))
+ Eina_List *l;
+ Ecore_X_Window xwin;
+ Eina_Bool have_drop_list = EINA_FALSE;
+
+ xwin = _x11_xwin_get(target_obj);
+ EINA_LIST_FOREACH(pd->drop_list, l, dropable)
{
- have_drop_list = EINA_TRUE;
- break;
+ if (xwin == _x11_xwin_get(dropable->obj))
+ {
+ have_drop_list = EINA_TRUE;
+ break;
+ }
}
+ if (!have_drop_list) ecore_x_dnd_aware_set(xwin, EINA_FALSE);
}
- 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);