mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-19 08:38:09 +02:00
input: Make setting the same pointer cursor state again a no-op
If the client calls wl_pointer.set_cursor with the same surface and hot spot coordinate that is already set, don't do anything as no state was changed. This avoids an issue where a client setting the same cursor surface multiple times would receive wl_surface.leave/enter on that surface every time. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
This commit is contained in:
parent
a86c3ee697
commit
b407024ea1
1 changed files with 4 additions and 0 deletions
|
|
@ -1655,6 +1655,10 @@ pointer_set_cursor(struct wl_client *client, struct wl_resource *resource,
|
|||
return;
|
||||
}
|
||||
|
||||
if (pointer->sprite && pointer->sprite->surface == surface &&
|
||||
pointer->hotspot_x == x && pointer->hotspot_y == y)
|
||||
return;
|
||||
|
||||
if (pointer->sprite)
|
||||
pointer_unmap_sprite(pointer);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue