mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
types/seat: Clear focus in wlr_seat_destroy()
This fixes use-after-free in surface destroy signal listeners.
This commit is contained in:
parent
caeed70f28
commit
ad46e125d5
1 changed files with 8 additions and 0 deletions
|
|
@ -159,6 +159,14 @@ void wlr_seat_destroy(struct wlr_seat *seat) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wlr_seat_pointer_clear_focus(seat);
|
||||||
|
wlr_seat_keyboard_clear_focus(seat);
|
||||||
|
|
||||||
|
struct wlr_touch_point* point;
|
||||||
|
wl_list_for_each(point, &seat->touch_state.touch_points, link) {
|
||||||
|
wlr_seat_touch_point_clear_focus(seat, 0, point->touch_id);
|
||||||
|
}
|
||||||
|
|
||||||
wlr_signal_emit_safe(&seat->events.destroy, seat);
|
wlr_signal_emit_safe(&seat->events.destroy, seat);
|
||||||
|
|
||||||
wl_list_remove(&seat->display_destroy.link);
|
wl_list_remove(&seat->display_destroy.link);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue