Add function to find a surface based on x/y
Use wl_display_terminate instead of destroy Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
1e24d7e730
commit
e8aba44ff7
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue