[PATCH] Fix pointer position clipping.
Kristian Hoegsberg
hoegsberg at gmail.com
Thu Feb 23 14:47:43 PST 2012
On Wed, Feb 22, 2012 at 01:57:51PM -0700, Scott Moreau wrote:
Yup, good fix, applied.
Kristian
> ---
> src/compositor.c | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/src/compositor.c b/src/compositor.c
> index 5a424fa..1963322 100644
> --- a/src/compositor.c
> +++ b/src/compositor.c
> @@ -1304,10 +1304,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 */
> @@ -1317,9 +1317,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) {
> --
> 1.7.4.1
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
More information about the wayland-devel
mailing list