[PATCH weston] compositor: Fix cursor positioning right after input_device.attach
Kristian Høgsberg
hoegsberg at gmail.com
Tue May 15 08:24:43 PDT 2012
On Tue, May 15, 2012 at 04:14:47PM +0300, Ander Conselvan de Oliveira wrote:
> The type of fields x and y in wl_input_device was changed to wl_fixed_t
> but input_device_attach() was still using it as if it were integer.
> This bug caused the pointer sprite to be configured in the wrong place
> on the screen (usually outside the visible area) but it would soon be
> corrected in notify_motion() making it hard to notice and usually only
> causing a quick flicker.
Ah! Thanks, that was driving me crazy.
Kristian
> ---
> src/compositor.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/compositor.c b/src/compositor.c
> index e0e0bee..3906506 100644
> --- a/src/compositor.c
> +++ b/src/compositor.c
> @@ -2022,8 +2022,8 @@ input_device_attach(struct wl_client *client,
> device->hotspot_x = x;
> device->hotspot_y = y;
> weston_surface_configure(device->sprite,
> - device->input_device.x - device->hotspot_x,
> - device->input_device.y - device->hotspot_y,
> + wl_fixed_to_int(device->input_device.x) - x,
> + wl_fixed_to_int(device->input_device.y) - y,
> buffer->width, buffer->height);
>
> surface_damage(NULL, &device->sprite->surface.resource,
> --
> 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