text: Assign text_model to a wl_seat

Add a wl_seat argument to the activate and deactivate requests of
text_method.

On activation a text_model gets assigned to the input_method of the
wl_seat specified in the activate request.
diff --git a/src/compositor.h b/src/compositor.h
index b66b2e7..7a8058e 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -47,6 +47,7 @@
 struct shell_surface;
 struct weston_seat;
 struct weston_output;
+struct input_method;
 
 enum weston_keyboard_modifier {
 	MODIFIER_CTRL = (1 << 0),
@@ -235,6 +236,8 @@
 		struct xkb_state *state;
 		enum weston_led leds;
 	} xkb_state;
+
+	struct input_method *input_method;
 };
 
 struct weston_shader {
@@ -739,7 +742,8 @@
 text_cursor_position_notifier_create(struct weston_compositor *ec);
 
 void
-input_method_create(struct weston_compositor *ec);
+input_method_create(struct weston_compositor *ec,
+		    struct weston_seat *seat);
 
 struct weston_process;
 typedef void (*weston_process_cleanup_func_t)(struct weston_process *process,