diff options
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r-- | sway/input/seat.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c index e9b375e0..9ea08eec 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c | |||
@@ -21,6 +21,16 @@ static void seat_device_destroy(struct sway_seat_device *seat_device) { | |||
21 | free(seat_device); | 21 | free(seat_device); |
22 | } | 22 | } |
23 | 23 | ||
24 | void sway_seat_destroy(struct sway_seat *seat) { | ||
25 | struct sway_seat_device *seat_device, *next; | ||
26 | wl_list_for_each_safe(seat_device, next, &seat->devices, link) { | ||
27 | seat_device_destroy(seat_device); | ||
28 | } | ||
29 | sway_cursor_destroy(seat->cursor); | ||
30 | wl_list_remove(&seat->link); | ||
31 | wlr_seat_destroy(seat->wlr_seat); | ||
32 | } | ||
33 | |||
24 | struct sway_seat *sway_seat_create(struct sway_input_manager *input, | 34 | struct sway_seat *sway_seat_create(struct sway_input_manager *input, |
25 | const char *seat_name) { | 35 | const char *seat_name) { |
26 | struct sway_seat *seat = calloc(1, sizeof(struct sway_seat)); | 36 | struct sway_seat *seat = calloc(1, sizeof(struct sway_seat)); |