From e136a4168ba08fbdd7b0d299238f2c78f72f8458 Mon Sep 17 00:00:00 2001 From: Andri Yngvason Date: Mon, 28 Dec 2020 15:10:42 +0000 Subject: types/seat: Clear focus in wlr_seat_destroy() This fixes use-after-free in surface destroy signal listeners. --- include/wlr/types/wlr_seat.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/wlr') diff --git a/include/wlr/types/wlr_seat.h b/include/wlr/types/wlr_seat.h index 5094874c..b34d4a72 100644 --- a/include/wlr/types/wlr_seat.h +++ b/include/wlr/types/wlr_seat.h @@ -318,7 +318,8 @@ struct wlr_seat_keyboard_focus_change_event { */ struct wlr_seat *wlr_seat_create(struct wl_display *display, const char *name); /** - * Destroys a wlr_seat and removes its wl_seat global. + * Destroys a wlr_seat, removes its wl_seat global and clears focus for all + * devices belonging to the seat. */ void wlr_seat_destroy(struct wlr_seat *wlr_seat); /** -- cgit v1.2.3