commit 0a5b783

Michael Forney  ·  2017-02-06 19:49:19 +0000 UTC
parent 9f7d7fc
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.
1 files changed,  +5, -0
+5, -0
 1@@ -142,6 +142,11 @@ pointer_set_cursor(struct pointer *pointer, uint32_t id)
 2 
 3 	if (pointer->cursor.internal_buffer)
 4 		wld_buffer_unreference(pointer->cursor.internal_buffer);
 5+	if (pointer->cursor.surface) {
 6+		surface_set_view(pointer->cursor.surface, NULL);
 7+		wl_list_remove(&pointer->cursor.destroy_listener.link);
 8+		pointer->cursor.surface = NULL;
 9+	}
10 
11 	buffer = wld_import_buffer(swc.shm->context, WLD_OBJECT_DATA, object,
12 	                           cursor->width, cursor->height, WLD_FORMAT_ARGB8888, cursor->width * 4);