mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-24 06:59:45 -05:00
Add wlr_surface_point_accepts_input
Ref https://github.com/swaywm/sway/pull/1674
This commit is contained in:
parent
2053a4c144
commit
e19ee6d469
3 changed files with 12 additions and 12 deletions
|
|
@ -952,3 +952,10 @@ void wlr_surface_set_role_committed(struct wlr_surface *surface,
|
|||
surface->role_committed = role_committed;
|
||||
surface->role_data = role_data;
|
||||
}
|
||||
|
||||
bool wlr_surface_point_accepts_input(
|
||||
struct wlr_surface *surface, double sx, double sy) {
|
||||
return sx >= 0 && sx <= surface->current->width &&
|
||||
sy >= 0 && sy <= surface->current->height &&
|
||||
pixman_region32_contains_point(&surface->current->input, sx, sy, NULL);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue