Merge pull request #1107 from ammen99/master

properly check if the point is inside the surface in wlr_surface_pointer_accepts_input
This commit is contained in:
emersion 2018-07-03 11:43:57 +01:00 committed by GitHub
commit 742c66d93f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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);
}