From 5766f426aac11bf39234dcca4c479ee865081dad Mon Sep 17 00:00:00 2001
From: Dominique Martinet <asmadeus@codewreck.org>
Date: Tue, 16 Jan 2018 21:16:04 +0100
Subject: config reload: destroy old seat when removed from config

This adds new sway_seat_destroy and sway_cursor_destroy helpers
and compare new and old config on free
---
 include/sway/input/cursor.h        | 1 +
 include/sway/input/input-manager.h | 2 ++
 include/sway/input/seat.h          | 2 ++
 3 files changed, 5 insertions(+)

(limited to 'include/sway/input')

diff --git a/include/sway/input/cursor.h b/include/sway/input/cursor.h
index 2f70cf4b..a16b793b 100644
--- a/include/sway/input/cursor.h
+++ b/include/sway/input/cursor.h
@@ -25,6 +25,7 @@ struct sway_cursor {
 	struct wl_listener request_set_cursor;
 };
 
+void sway_cursor_destroy(struct sway_cursor *cursor);
 struct sway_cursor *sway_cursor_create(struct sway_seat *seat);
 
 #endif
diff --git a/include/sway/input/input-manager.h b/include/sway/input/input-manager.h
index 2bf297ce..63806b8e 100644
--- a/include/sway/input/input-manager.h
+++ b/include/sway/input/input-manager.h
@@ -46,4 +46,6 @@ void sway_input_manager_apply_seat_config(struct sway_input_manager *input,
 struct sway_seat *sway_input_manager_get_default_seat(
 		struct sway_input_manager *input);
 
+struct sway_seat *input_manager_get_seat(struct sway_input_manager *input,
+		const char *seat_name);
 #endif
diff --git a/include/sway/input/seat.h b/include/sway/input/seat.h
index d703f94c..b21cbccb 100644
--- a/include/sway/input/seat.h
+++ b/include/sway/input/seat.h
@@ -29,6 +29,8 @@ struct sway_seat {
 struct sway_seat *sway_seat_create(struct sway_input_manager *input,
 		const char *seat_name);
 
+void sway_seat_destroy(struct sway_seat *seat);
+
 void sway_seat_add_device(struct sway_seat *seat,
 		struct sway_input_device *device);
 
-- 
cgit v1.2.3