mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 21:05:58 +01:00
properly check if the point is inside the surface in wlr_surface_point_accepts_input
This commit is contained in:
parent
27cab67b96
commit
00ccf5c3ae
1 changed files with 2 additions and 2 deletions
|
@ -895,8 +895,8 @@ struct wlr_surface *wlr_surface_get_root_surface(struct wlr_surface *surface) {
|
||||||
|
|
||||||
bool wlr_surface_point_accepts_input(struct wlr_surface *surface,
|
bool wlr_surface_point_accepts_input(struct wlr_surface *surface,
|
||||||
double sx, double sy) {
|
double sx, double sy) {
|
||||||
return sx >= 0 && sx <= surface->current->width &&
|
return sx >= 0 && sx < surface->current->width &&
|
||||||
sy >= 0 && sy <= surface->current->height &&
|
sy >= 0 && sy < surface->current->height &&
|
||||||
pixman_region32_contains_point(&surface->current->input, sx, sy, NULL);
|
pixman_region32_contains_point(&surface->current->input, sx, sy, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue