input/cursor: handle image surface destroy

This adds a listener for the destroy event of the cursor image surface.
This prevents a use-after-free when the last visible image surface is
freed, there has not been a new cursor set, and the cursor is reshown.
This commit is contained in:
Brian Ashworth 2020-01-05 16:50:48 -05:00 committed by Drew DeVault
parent c1cab4bf0e
commit 9d48a3d78d
2 changed files with 19 additions and 0 deletions

View file

@ -58,6 +58,7 @@ struct sway_cursor {
uint32_t tool_buttons;
struct wl_listener request_set_cursor;
struct wl_listener image_surface_destroy;
struct wl_listener constraint_commit;