diff --git a/src/bin/e_wayland/e_comp.c b/src/bin/e_wayland/e_comp.c index 21018fe4a..c9071794a 100644 --- a/src/bin/e_wayland/e_comp.c +++ b/src/bin/e_wayland/e_comp.c @@ -264,7 +264,7 @@ e_compositor_shutdown(E_Compositor *comp) if (comp->fd_hdlr) ecore_main_fd_handler_del(comp->fd_hdlr); /* destroy the previously created display */ - if (comp->wl.display) wl_display_destroy(comp->wl.display); + if (comp->wl.display) wl_display_terminate(comp->wl.display); return EINA_TRUE; } @@ -342,6 +342,21 @@ e_compositor_get_time(void) return (tv.tv_sec * 1000 + tv.tv_usec / 1000); } +EAPI E_Surface * +e_compositor_surface_find(E_Compositor *comp, Evas_Coord x, Evas_Coord y) +{ + E_Surface *es; + Eina_List *l; + + EINA_LIST_FOREACH(comp->surfaces, l, es) + { + if (pixman_region32_contains_point(&es->input, x, y, NULL)) + return es; + } + + return NULL; +} + /* local functions */ static void _e_comp_cb_bind(struct wl_client *client, void *data, unsigned int version EINA_UNUSED, unsigned int id) @@ -369,7 +384,7 @@ _e_comp_cb_surface_create(struct wl_client *client, struct wl_resource *resource E_Compositor *comp; E_Surface *es; - printf("E_Comp Surface Create\n"); + printf("E_Comp Surface Create: %d\n", id); /* try to cast to our compositor */ if (!(comp = resource->data)) return; diff --git a/src/bin/e_wayland/e_comp.h b/src/bin/e_wayland/e_comp.h index c5e602dc2..a76273da0 100644 --- a/src/bin/e_wayland/e_comp.h +++ b/src/bin/e_wayland/e_comp.h @@ -67,6 +67,7 @@ EAPI void e_compositor_plane_stack(E_Compositor *comp, E_Plane *plane, E_Plane * EAPI int e_compositor_input_read(int fd EINA_UNUSED, unsigned int mask EINA_UNUSED, void *data); EAPI void e_compositor_damage_calculate(E_Compositor *comp); EAPI unsigned int e_compositor_get_time(void); +EAPI E_Surface *e_compositor_surface_find(E_Compositor *comp, Evas_Coord x, Evas_Coord y); # endif #endif