swc

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/swc
Log | Files | Refs | README | LICENSE

commit 0a5b78383629d22477fa4d598de8f00173a041db
parent 9f7d7fcd8bef8908e012a8a06d9e24ab7f45dbd4
Author: Michael Forney <mforney@mforney.org>
Date:   Mon,  6 Feb 2017 11:49:19 -0800

pointer: Unset prior cursor surface in pointer_set_cursor

This will allow us to reset the cursor back to a known shape when no
surface has pointer focus.

Diffstat:
Mlibswc/pointer.c | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/libswc/pointer.c b/libswc/pointer.c @@ -142,6 +142,11 @@ pointer_set_cursor(struct pointer *pointer, uint32_t id) if (pointer->cursor.internal_buffer) wld_buffer_unreference(pointer->cursor.internal_buffer); + if (pointer->cursor.surface) { + surface_set_view(pointer->cursor.surface, NULL); + wl_list_remove(&pointer->cursor.destroy_listener.link); + pointer->cursor.surface = NULL; + } buffer = wld_import_buffer(swc.shm->context, WLD_OBJECT_DATA, object, cursor->width, cursor->height, WLD_FORMAT_ARGB8888, cursor->width * 4);