From d16127b3cb0dc58099f77fb2bf6070c4fe4eefb8 Mon Sep 17 00:00:00 2001 From: emersion Date: Wed, 4 Apr 2018 16:48:23 -0400 Subject: Fix wlr_surface_subsurface_at, change it to be wlr_surface_surface_at --- include/wlr/types/wlr_surface.h | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'include') diff --git a/include/wlr/types/wlr_surface.h b/include/wlr/types/wlr_surface.h index 4d03df73..6ece247a 100644 --- a/include/wlr/types/wlr_surface.h +++ b/include/wlr/types/wlr_surface.h @@ -122,20 +122,24 @@ void wlr_surface_make_subsurface(struct wlr_surface *surface, struct wlr_surface *parent, uint32_t id); /** - * Get the top of the subsurface tree for this surface. + * Get the root of the subsurface tree for this surface. */ -struct wlr_surface *wlr_surface_get_main_surface(struct wlr_surface *surface); +struct wlr_surface *wlr_surface_get_root_surface(struct wlr_surface *surface); /** - * Find a subsurface within this surface at the surface-local coordinates. - * Returns the surface and coordinates in the topmost surface coordinate system - * or NULL if no subsurface is found at that location. + * Check if the surface accepts input events at the given surface-local + * coordinates. */ -struct wlr_subsurface *wlr_surface_subsurface_at(struct wlr_surface *surface, - double sx, double sy, double *sub_x, double *sub_y); +bool wlr_surface_point_accepts_input(struct wlr_surface *surface, + double sx, double sy); -bool wlr_surface_point_accepts_input( - struct wlr_surface *surface, double sx, double sy); +/** + * Find a surface in this surface's tree that accepts input events at the given + * surface-local coordinates. Returns the surface and coordinates in the leaf + * surface coordinate system or NULL if no surface is found at that location. + */ +struct wlr_surface *wlr_surface_surface_at(struct wlr_surface *surface, + double sx, double sy, double *sub_x, double *sub_y); void wlr_surface_send_enter(struct wlr_surface *surface, struct wlr_output *output); -- cgit v1.2.3