Merge remote-tracking branch 'robster/rob/pointer-fixes'

dev
Kristian Høgsberg 13 years ago
commit ac5098f11a
  1. 8
      clients/window.c
  2. 7
      compositor/compositor.c

@ -671,6 +671,10 @@ create_pointer_surfaces(struct display *display)
display_create_surface_from_file(display,
pointer_images[i].filename,
&rect);
if (!display->pointer_surfaces[i]) {
fprintf(stderr, "Error loading pointer image: %s\n",
pointer_images[i].filename);
}
}
}
@ -1172,6 +1176,10 @@ set_pointer_image(struct input *input, uint32_t time, int pointer)
input->current_pointer_image = pointer;
surface = display->pointer_surfaces[pointer];
if (!surface)
return;
buffer = display_get_buffer_for_surface(display, surface);
wl_input_device_attach(input->input_device, time, buffer,
pointer_images[pointer].hotspot_x,

@ -559,6 +559,10 @@ create_pointer_images(struct wlsc_compositor *ec)
create_sprite_from_png(ec,
pointer_images[i].filename,
SPRITE_USE_CURSOR);
if (!ec->pointer_sprites[i]) {
fprintf(stderr, "Error loading pointer image: %s\n",
pointer_images[i].filename);
}
}
}
@ -1190,6 +1194,9 @@ static void
wlsc_input_device_attach_sprite(struct wlsc_input_device *device,
struct wlsc_sprite *sprite, int x, int y)
{
if (!sprite)
return;
wlsc_sprite_attach(sprite, &device->sprite->surface);
wlsc_input_device_attach(device, x, y, sprite->width, sprite->height);
}

Loading…
Cancel
Save