diff options
author | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2016-07-21 17:01:21 +0900 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2016-07-21 17:01:21 +0900 |
commit | 1a982fd72afc0aebaea5fd10f9acd08841291d60 (patch) | |
tree | d5d324a2f0ad580de126f3d96fc8703549433a99 | |
parent | bd43f0704632da558bfcd534686bfa82b94b3647 (diff) | |
download | enlightenment-1a982fd72afc0aebaea5fd10f9acd08841291d60.tar.gz |
e - fix dnd problems coming from getting top object in comp canvas
so getting top object was broken. it didnt account for repeat event
objects that would be included. so get the full l,ist and walk them
top to bottom for the first one thats a client. THAT is the correct
thing to do. this would affect both x11 and wayland.
@fix
-rw-r--r-- | src/bin/e_comp.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/bin/e_comp.c b/src/bin/e_comp.c index 7fc6a2b7dd..82a2c2a757 100644 --- a/src/bin/e_comp.c +++ b/src/bin/e_comp.c @@ -1477,13 +1477,22 @@ E_API Ecore_Window e_comp_top_window_at_xy_get(Evas_Coord x, Evas_Coord y) { E_Client *ec; + Eina_List *objs, *l; Evas_Object *o; EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp, 0); - o = evas_object_top_at_xy_get(e_comp->evas, x, y, 0, 0); - if (!o) return e_comp->ee_win; - ec = evas_object_data_get(o, "E_Client"); - if (ec) return e_client_util_pwin_get(ec); + objs = evas_objects_at_xy_get(e_comp->evas, x, y, 0, 0); + if (!objs) return e_comp->ee_win; + EINA_LIST_FOREACH(objs, l, o) + { + ec = evas_object_data_get(o, "E_Client"); + if (ec) + { + eina_list_free(objs); + return e_client_util_pwin_get(ec); + } + } + eina_list_free(objs); return e_comp->ee_win; } |