diff options
author | Ilia Bozhinov <ammen99@gmail.com> | 2018-07-03 10:29:02 +0300 |
---|---|---|
committer | Ilia Bozhinov <ammen99@gmail.com> | 2018-07-03 10:29:02 +0300 |
commit | 00ccf5c3aedfa4b2af3d1555e7b3d70b30c82482 (patch) | |
tree | 016bc17d2ffa160ef292542482d25cab8a08145f | |
parent | 27cab67b964b373c5052a6aa55d54fbcc4188498 (diff) |
properly check if the point is inside the surface in wlr_surface_point_accepts_input
-rw-r--r-- | types/wlr_surface.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/types/wlr_surface.c b/types/wlr_surface.c index 6bf224db..9c32bda2 100644 --- a/types/wlr_surface.c +++ b/types/wlr_surface.c @@ -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, double sx, double sy) { - return sx >= 0 && sx <= surface->current->width && - sy >= 0 && sy <= surface->current->height && + return sx >= 0 && sx < surface->current->width && + sy >= 0 && sy < surface->current->height && pixman_region32_contains_point(&surface->current->input, sx, sy, NULL); } |