window: Use new wl_pointer/keyboard_release request

Since we bump the version we ask for from the compositor it is also
necessary to implement the new "name" event in the seat listener.
diff --git a/clients/window.c b/clients/window.c
index 4f63132..c1fc3e7 100644
--- a/clients/window.c
+++ b/clients/window.c
@@ -130,6 +130,7 @@
 	void *dummy_surface_data;
 
 	int has_rgb565;
+	int seat_version;
 };
 
 enum {
@@ -3395,8 +3396,16 @@
 	}
 }
 
+static void
+seat_handle_name(void *data, struct wl_seat *seat,
+		 const char *name)
+{
+
+}
+
 static const struct wl_seat_listener seat_listener = {
 	seat_handle_capabilities,
+	seat_handle_name
 };
 
 void
@@ -4937,6 +4946,8 @@
 	xkb_map_unref(input->xkb.keymap);
 }
 
+#define MAX(a,b) ((a) > (b) ? a : b)
+
 static void
 display_add_input(struct display *d, uint32_t id)
 {
@@ -4944,7 +4955,8 @@
 
 	input = xzalloc(sizeof *input);
 	input->display = d;
-	input->seat = wl_registry_bind(d->registry, id, &wl_seat_interface, 1);
+	input->seat = wl_registry_bind(d->registry, id, &wl_seat_interface,
+				       MAX(d->seat_version, 3));
 	input->touch_focus = NULL;
 	input->pointer_focus = NULL;
 	input->keyboard_focus = NULL;
@@ -4982,6 +4994,14 @@
 		data_offer_destroy(input->selection_offer);
 
 	wl_data_device_destroy(input->data_device);
+
+	if (input->display->seat_version >= 3) {
+		if (input->pointer)
+			wl_pointer_release(input->pointer);
+		if (input->keyboard)
+			wl_keyboard_release(input->keyboard);
+	}
+
 	fini_xkb(input);
 
 	wl_surface_destroy(input->pointer_surface);
@@ -5036,6 +5056,7 @@
 	} else if (strcmp(interface, "wl_output") == 0) {
 		display_add_output(d, id);
 	} else if (strcmp(interface, "wl_seat") == 0) {
+		d->seat_version = version;
 		display_add_input(d, id);
 	} else if (strcmp(interface, "wl_shell") == 0) {
 		d->shell = wl_registry_bind(registry,