layout/comp "top at xy" functions now allow restricting based on visibility
fixes desktop gadget dnd
This commit is contained in:
parent
274d069c94
commit
89664c894e
|
@ -5255,7 +5255,7 @@ e_comp_zone_update(E_Comp_Zone *cz)
|
|||
}
|
||||
|
||||
EAPI Ecore_X_Window
|
||||
e_comp_top_window_at_xy_get(E_Comp *c, Evas_Coord x, Evas_Coord y, Ecore_X_Window *ignore, unsigned int ignore_num)
|
||||
e_comp_top_window_at_xy_get(E_Comp *c, Evas_Coord x, Evas_Coord y, Eina_Bool vis, Ecore_X_Window *ignore, unsigned int ignore_num)
|
||||
{
|
||||
E_Comp_Win *cw;
|
||||
Evas_Object *o;
|
||||
|
@ -5276,7 +5276,7 @@ e_comp_top_window_at_xy_get(E_Comp *c, Evas_Coord x, Evas_Coord y, Ecore_X_Windo
|
|||
ignore_list = eina_list_append(ignore_list, cw->effect_obj);
|
||||
}
|
||||
}
|
||||
o = e_layout_top_child_at_xy_get(c->layout, x, y, ignore_list);
|
||||
o = e_layout_top_child_at_xy_get(c->layout, x, y, vis, ignore_list);
|
||||
eina_list_free(ignore_list);
|
||||
cw = evas_object_data_get(o, "comp_win");
|
||||
if (!cw) return c->ee_win;
|
||||
|
|
|
@ -248,7 +248,7 @@ EAPI void e_comp_win_opacity_set(E_Comp_Win *cw, unsigned int opacity);
|
|||
EAPI E_Comp *e_comp_get(void *o);
|
||||
EAPI void e_comp_populate(E_Comp *c);
|
||||
|
||||
EAPI Ecore_X_Window e_comp_top_window_at_xy_get(E_Comp *c, Evas_Coord x, Evas_Coord y, Ecore_X_Window *ignore, unsigned int ignore_num);
|
||||
EAPI Ecore_X_Window e_comp_top_window_at_xy_get(E_Comp *c, Evas_Coord x, Evas_Coord y, Eina_Bool vis, Ecore_X_Window *ignore, unsigned int ignore_num);
|
||||
|
||||
/* for injecting objects into the comp layout */
|
||||
EAPI E_Comp_Win *e_comp_object_inject(E_Comp *c, Evas_Object *obj, E_Object *eobj, E_Layer layer);
|
||||
|
|
|
@ -766,7 +766,7 @@ _e_drag_update(Ecore_X_Window root, int x, int y, Ecore_X_Atom action)
|
|||
{
|
||||
Ecore_X_Window ignore[1];
|
||||
ignore[0] = _drag_win;
|
||||
win = e_comp_top_window_at_xy_get(e_comp_get(_drag_current), x, y, ignore, 1);
|
||||
win = e_comp_top_window_at_xy_get(e_comp_get(_drag_current), x, y, 1, ignore, 1);
|
||||
}
|
||||
else
|
||||
win = root;
|
||||
|
@ -894,7 +894,7 @@ _e_drag_end(int x, int y)
|
|||
|
||||
if (!_drag_current) return;
|
||||
ignore[0] = _drag_win;
|
||||
win = e_comp_top_window_at_xy_get(e_comp_get(_drag_current), x, y, ignore, 1);
|
||||
win = e_comp_top_window_at_xy_get(e_comp_get(_drag_current), x, y, 1, ignore, 1);
|
||||
zone = e_container_zone_at_point_get(_drag_current->container, x, y);
|
||||
/* Pass -1, -1, so that it is possible to drop at the edge. */
|
||||
if (zone) e_zone_flip_coords_handle(zone, -1, -1);
|
||||
|
|
|
@ -302,7 +302,7 @@ e_layout_children_get(Evas_Object *obj)
|
|||
}
|
||||
|
||||
EAPI Evas_Object *
|
||||
e_layout_top_child_at_xy_get(Evas_Object *obj, Evas_Coord x, Evas_Coord y, const Eina_List *ignore)
|
||||
e_layout_top_child_at_xy_get(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Eina_Bool vis, const Eina_List *ignore)
|
||||
{
|
||||
E_Smart_Data *sd;
|
||||
E_Layout_Item *li;
|
||||
|
@ -314,7 +314,8 @@ e_layout_top_child_at_xy_get(Evas_Object *obj, Evas_Coord x, Evas_Coord y, const
|
|||
if (E_INSIDE(x, y, li->x, li->y, li->w, li->h))
|
||||
{
|
||||
if (eina_list_data_find(ignore, li->obj)) continue;
|
||||
return li->obj;
|
||||
if ((!vis) || evas_object_visible_get(li->obj))
|
||||
return li->obj;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ EAPI void e_layout_child_geometry_get(Evas_Object *obj, Evas_Coord *x, E
|
|||
EAPI void e_layout_unpack (Evas_Object *obj);
|
||||
|
||||
EAPI Eina_List *e_layout_children_get(Evas_Object *obj);
|
||||
EAPI Evas_Object *e_layout_top_child_at_xy_get(Evas_Object *obj, Evas_Coord x, Evas_Coord y, const Eina_List *ignore);
|
||||
EAPI Evas_Object *e_layout_top_child_at_xy_get(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Eina_Bool vis, const Eina_List *ignore);
|
||||
|
||||
EAPI Evas_Object *e_layout_child_below_get(Evas_Object *obj);
|
||||
EAPI Evas_Object *e_layout_child_above_get(Evas_Object *obj);
|
||||
|
|
Loading…
Reference in New Issue