summaryrefslogtreecommitdiff
path: root/src/input.c
diff options
context:
space:
mode:
authorJonas Ådahl <jadahl@gmail.com>2014-09-08 19:33:41 +0200
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>2014-09-10 14:20:13 +0300
commit16fe4dcea9be67dd9c396be916b0d4cbb1769e76 (patch)
tree01de2d9fd35084bbde826fb4ec528e2180af2a4e /src/input.c
parent00535ce6b4bee3daac378e3baa83966dcbd96b0b (diff)
downloadweston-16fe4dcea9be67dd9c396be916b0d4cbb1769e76.tar.gz
input: Schedule pointer sprite repaint when cursor is set
If a cursor was set with wl_pointer.set_cursor but not in combination with an action that has the side effect of damaging the region where the cursor is positioned, it would not be drawn. This patch explicitly schedules a repaint of the pointer sprite when it is set. clickdot is updated to illustrate the bug; when moving the pointer over clickdot, the pointer is hidden. When not having moved the pointer for 500 ms it is made visible using wl_pointer.set_pointer. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Diffstat (limited to 'src/input.c')
-rw-r--r--src/input.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/input.c b/src/input.c
index 5e82f5dd..530904d6 100644
--- a/src/input.c
+++ b/src/input.c
@@ -1665,8 +1665,10 @@ pointer_set_cursor(struct wl_client *client, struct wl_resource *resource,
pointer->hotspot_x = x;
pointer->hotspot_y = y;
- if (surface->buffer_ref.buffer)
+ if (surface->buffer_ref.buffer) {
pointer_cursor_surface_configure(surface, 0, 0);
+ weston_view_schedule_repaint(pointer->sprite);
+ }
}
static void