[PATCH] compositor: insert the cursor sprite below the fade surface
Ander Conselvan de Oliveira
ander.conselvan.de.oliveira at intel.com
Mon Jan 30 07:55:57 PST 2012
Otherwise we end up not fading the cursor if the attach happens after
the fade started.
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira at intel.com>
---
src/compositor.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/src/compositor.c b/src/compositor.c
index 0d63e2a..bf6d5c1 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -1626,6 +1626,7 @@ input_device_attach(struct wl_client *client,
struct weston_input_device *device = resource->data;
struct weston_compositor *compositor = device->compositor;
struct wl_buffer *buffer;
+ struct wl_list *list;
if (time < device->input_device.pointer_focus_time)
return;
@@ -1637,6 +1638,14 @@ input_device_attach(struct wl_client *client,
if (device->sprite)
weston_surface_damage_below(device->sprite);
+ if (!device->drag_sprite) {
+ device->drag_sprite = weston_surface_create(compositor);
+ list = &compositor->surface_list;
+ if (compositor->fade.surface &&
+ list->next == &compositor->fade.surface->link)
+ list = list->next;
+ wl_list_insert(list, &device->drag_sprite->link);
+ }
if (!buffer_resource) {
if (device->sprite) {
destroy_surface(&device->sprite->surface.resource);
--
1.7.4.1
More information about the wayland-devel
mailing list