[PATCH v2] compositor: insert the cursor sprite below the fade surface
Ander Conselvan de Oliveira
ander.conselvan.de.oliveira at intel.com
Mon Jan 30 23:55:27 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 | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/compositor.c b/src/compositor.c
index 0d63e2a..954cbd2 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;
@@ -1647,8 +1648,11 @@ input_device_attach(struct wl_client *client,
if (!device->sprite) {
device->sprite = weston_surface_create(compositor);
- wl_list_insert(&compositor->surface_list,
- &device->sprite->link);
+ list = &compositor->surface_list;
+ if (compositor->fade.surface &&
+ list->next == &compositor->fade.surface->link)
+ list = list->next;
+ wl_list_insert(list, &device->sprite->link);
}
buffer = buffer_resource->data;
--
1.7.4.1
More information about the wayland-devel
mailing list