compositor: Fix cursor positioning right after input_device.attach

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.
This commit is contained in:
Ander Conselvan de Oliveira 2012-05-15 16:14:47 +03:00 committed by Kristian Høgsberg
parent 6d2030dabb
commit f6f9069138

View File

@ -2010,8 +2010,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,