diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-10-09 17:28:27 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-09 17:28:27 -0400 |
commit | 1c3c2ff90a2d33543c5015a3067e792d887d7ea4 (patch) | |
tree | 0da46ef4943a13c713c5c2a587f636090b9fabc7 /include | |
parent | b9aee31f58c87b84f9627a9d2d87a69f58e2d36b (diff) | |
parent | 654e2ccd6b292f65d9a00c64757df9f4371d879d (diff) |
Merge pull request #250 from acrisci/feature/surface-finder-to-wlr
move surface finder functions to wlroots
Diffstat (limited to 'include')
-rw-r--r-- | include/wlr/types/wlr_surface.h | 7 | ||||
-rw-r--r-- | include/wlr/types/wlr_xdg_shell_v6.h | 8 |
2 files changed, 15 insertions, 0 deletions
diff --git a/include/wlr/types/wlr_surface.h b/include/wlr/types/wlr_surface.h index 9f898b38..03376788 100644 --- a/include/wlr/types/wlr_surface.h +++ b/include/wlr/types/wlr_surface.h @@ -122,4 +122,11 @@ void wlr_surface_make_subsurface(struct wlr_surface *surface, */ struct wlr_surface *wlr_surface_get_main_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. + */ +struct wlr_subsurface *wlr_surface_subsurface_at(struct wlr_surface *surface, + double sx, double sy, double *sub_x, double *sub_y); #endif diff --git a/include/wlr/types/wlr_xdg_shell_v6.h b/include/wlr/types/wlr_xdg_shell_v6.h index 00295ec1..48da6604 100644 --- a/include/wlr/types/wlr_xdg_shell_v6.h +++ b/include/wlr/types/wlr_xdg_shell_v6.h @@ -206,4 +206,12 @@ void wlr_xdg_toplevel_v6_set_resizing(struct wlr_xdg_surface_v6 *surface, */ void wlr_xdg_toplevel_v6_send_close(struct wlr_xdg_surface_v6 *surface); +/** + * Find a popup within this surface at the surface-local coordinates. Returns + * the popup and coordinates in the topmost surface coordinate system or NULL if + * no popup is found at that location. + */ +struct wlr_xdg_surface_v6 *wlr_xdg_surface_v6_popup_at( + struct wlr_xdg_surface_v6 *surface, double sx, double sy, + double *popup_sx, double *popup_sy); #endif |