aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-12-09 16:45:31 +0100
committeremersion <contact@emersion.fr>2019-01-24 12:18:00 +0100
commit9d6cb85b2d7d2627581b957d51944b62705562c0 (patch)
tree7a91ffeaadb75c8416c166dcbddb483f11730f83
parentc20d413f8aa86435bf85862ca132c66469b75560 (diff)
seat: simplify data source destroy
-rw-r--r--types/seat/wlr_seat.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/types/seat/wlr_seat.c b/types/seat/wlr_seat.c
index bc092fc6..41dcaae6 100644
--- a/types/seat/wlr_seat.c
+++ b/types/seat/wlr_seat.c
@@ -157,14 +157,8 @@ void wlr_seat_destroy(struct wlr_seat *seat) {
wl_list_remove(&seat->display_destroy.link);
- if (seat->selection_source) {
- wl_list_remove(&seat->selection_source_destroy.link);
- wlr_data_source_destroy(seat->selection_source);
- seat->selection_source = NULL;
- }
-
- wlr_seat_set_primary_selection(seat, NULL,
- wl_display_next_serial(seat->display));
+ wlr_data_source_destroy(seat->selection_source);
+ wlr_primary_selection_source_destroy(seat->primary_selection_source);
struct wlr_seat_client *client, *tmp;
wl_list_for_each_safe(client, tmp, &seat->clients, link) {