From 897c36b12cc4b706bcb730a47181d829d7ab9729 Mon Sep 17 00:00:00 2001 From: Brian Ashworth Date: Sun, 5 Jan 2020 16:50:48 -0500 Subject: 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. --- include/sway/input/cursor.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/sway/input/cursor.h') diff --git a/include/sway/input/cursor.h b/include/sway/input/cursor.h index 0bcd262f..5b6f9a9f 100644 --- a/include/sway/input/cursor.h +++ b/include/sway/input/cursor.h @@ -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; -- cgit v1.2.3-54-g00ecf