From 5ac05b0c475aae86e0a9356dc68d59a5f4004d5e Mon Sep 17 00:00:00 2001
From: Tony Crisci <tony@dubstepdish.com>
Date: Tue, 7 Nov 2017 16:24:21 -0500
Subject: rootston: input remove stubs

---
 rootston/input.c |  2 +-
 rootston/seat.c  | 43 ++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 43 insertions(+), 2 deletions(-)

(limited to 'rootston')

diff --git a/rootston/input.c b/rootston/input.c
index 8e45d6d3..08cde4a1 100644
--- a/rootston/input.c
+++ b/rootston/input.c
@@ -63,7 +63,7 @@ static void input_add_notify(struct wl_listener *listener, void *data) {
 
 static void input_remove_notify(struct wl_listener *listener, void *data) {
 	struct wlr_input_device *device = data;
-	struct roots_input *input = wl_container_of(listener, input, input_add);
+	struct roots_input *input = wl_container_of(listener, input, input_remove);
 
 	struct roots_seat *seat;
 	wl_list_for_each(seat, &input->seats, link) {
diff --git a/rootston/seat.c b/rootston/seat.c
index ec7709fa..3a009a51 100644
--- a/rootston/seat.c
+++ b/rootston/seat.c
@@ -352,11 +352,52 @@ void roots_seat_add_device(struct roots_seat *seat,
 	}
 }
 
-void roots_seat_remove_device(struct roots_seat *seat,
+static void seat_remove_keyboard(struct roots_seat *seat,
+		struct wlr_input_device *device) {
+	// TODO
+}
+
+static void seat_remove_pointer(struct roots_seat *seat,
+		struct wlr_input_device *device) {
+	// TODO
+}
+
+static void seat_remove_touch(struct roots_seat *seat,
+		struct wlr_input_device *device) {
+	// TODO
+}
+
+static void seat_remove_tablet_pad(struct roots_seat *seat,
+		struct wlr_input_device *device) {
+	// TODO
+}
+
+static void seat_remove_tablet_tool(struct roots_seat *seat,
 		struct wlr_input_device *device) {
 	// TODO
 }
 
+void roots_seat_remove_device(struct roots_seat *seat,
+		struct wlr_input_device *device) {
+	switch (device->type) {
+	case WLR_INPUT_DEVICE_KEYBOARD:
+		seat_remove_keyboard(seat, device);
+		break;
+	case WLR_INPUT_DEVICE_POINTER:
+		seat_remove_pointer(seat, device);
+		break;
+	case WLR_INPUT_DEVICE_TOUCH:
+		seat_remove_touch(seat, device);
+		break;
+	case WLR_INPUT_DEVICE_TABLET_PAD:
+		seat_remove_tablet_pad(seat, device);
+		break;
+	case WLR_INPUT_DEVICE_TABLET_TOOL:
+		seat_remove_tablet_tool(seat, device);
+		break;
+	}
+}
+
 void roots_seat_configure_xcursor(struct roots_seat *seat) {
 	struct wlr_xcursor *xcursor = get_default_xcursor(seat->cursor->xcursor_theme);
 	struct wlr_xcursor_image *image = xcursor->images[0];
-- 
cgit v1.2.3