diff options
author | Scott Moreau <oreaus@gmail.com> | 2012-02-22 13:57:51 -0700 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-02-23 17:45:56 -0500 |
commit | 2493be40a301a1221deafbfe44b5213894da70a4 (patch) | |
tree | 7b1f52d29e3a9f12609e0ea91dbdab02b396ce9a | |
parent | ccbf29dcb48a2edadf6ca292c6fc4a8d093f8ee1 (diff) |
Fix pointer position clipping.
-rw-r--r-- | src/compositor.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compositor.c b/src/compositor.c index a84ac08..3797a71 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -1463,10 +1463,10 @@ notify_motion(struct wl_input_device *device, uint32_t time, int x, int y) weston_compositor_activity(ec); wl_list_for_each(output, &ec->output_list, link) { - if (output->x <= x && x <= output->x + output->current->width) + if (output->x <= x && x < output->x + output->current->width) x_valid = 1; - if (output->y <= y && y <= output->y + output->current->height) + if (output->y <= y && y < output->y + output->current->height) y_valid = 1; /* FIXME: calculate this only on output addition/deletion */ @@ -1476,9 +1476,9 @@ notify_motion(struct wl_input_device *device, uint32_t time, int x, int y) min_y = output->y; if (output->x + output->current->width > max_x) - max_x = output->x + output->current->width; + max_x = output->x + output->current->width - 1; if (output->y + output->current->height > max_y) - max_y = output->y + output->current->height; + max_y = output->y + output->current->height - 1; } if (!x_valid) { |