Copying xkb_info when creating a seat causes problems

Hi Kristian,

Here's a new patch for ref counting weston_xkb_info, as suggested.
So a seat created with a NULL keymap will now point to the global xkb_info.
diff --git a/src/compositor.h b/src/compositor.h
index 28757d9..a6f2c62 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -403,6 +403,7 @@
 	int keymap_fd;
 	size_t keymap_size;
 	char *keymap_area;
+	int32_t ref_count;
 	xkb_mod_index_t shift_mod;
 	xkb_mod_index_t caps_mod;
 	xkb_mod_index_t ctrl_mod;
@@ -473,7 +474,7 @@
 
 	void (*led_update)(struct weston_seat *ws, enum weston_led leds);
 
-	struct weston_xkb_info xkb_info;
+	struct weston_xkb_info *xkb_info;
 	struct {
 		struct xkb_state *state;
 		enum weston_led leds;
@@ -593,7 +594,7 @@
 
 	struct xkb_rule_names xkb_names;
 	struct xkb_context *xkb_context;
-	struct weston_xkb_info xkb_info;
+	struct weston_xkb_info *xkb_info;
 
 	/* Raw keyboard processing (no libxkbcommon initialization or handling) */
 	int use_xkbcommon;