Merge remote-tracking branch 'pq/compositor-dtors-v1'

This collided with the big weston rename, but git did a good job of fixing
most cases.

Conflicts:
	compositor/compositor.h
	src/compositor-x11.c
	src/compositor.c
	src/screenshooter.c
	src/util.c
diff --git a/src/compositor.h b/src/compositor.h
index 209c21d..0f47393 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -103,7 +103,6 @@
 	int32_t hotspot_x, hotspot_y;
 	struct wl_list link;
 	uint32_t modifier_state;
-	struct wl_selection *selection;
 
 	struct wl_list drag_resource_list;
 	struct weston_data_source *drag_data_source;
@@ -161,6 +160,7 @@
 	void (*configure)(struct weston_shell *shell,
 			  struct weston_surface *surface,
 			  int32_t x, int32_t y, int32_t width, int32_t height);
+	void (*destroy)(struct weston_shell *shell);
 };
 
 enum {
@@ -169,6 +169,8 @@
 	WESTON_COMPOSITOR_SLEEPING	/* no rendering, no frame events */
 };
 
+struct screenshooter;
+
 struct weston_compositor {
 	struct wl_shm *shm;
 	struct weston_xserver *wxs;
@@ -225,6 +227,8 @@
 	int (*authenticate)(struct weston_compositor *c, uint32_t id);
 	EGLImageKHR (*create_cursor_image)(struct weston_compositor *c,
 					   int32_t *width, int32_t *height);
+
+	struct screenshooter *screenshooter;
 };
 
 #define MODIFIER_CTRL	(1 << 8)
@@ -354,6 +358,9 @@
 weston_binding_destroy(struct weston_binding *binding);
 
 void
+weston_binding_list_destroy_all(struct wl_list *list);
+
+void
 weston_compositor_run_binding(struct weston_compositor *compositor,
 			      struct weston_input_device *device,
 			      uint32_t time,
@@ -404,6 +411,9 @@
 			 struct weston_compositor *ec);
 
 void
+weston_input_device_release(struct weston_input_device *device);
+
+void
 weston_switcher_init(struct weston_compositor *compositor);
 
 enum {
@@ -420,9 +430,12 @@
 void
 tty_destroy(struct tty *tty);
 
-void
+struct screenshooter *
 screenshooter_create(struct weston_compositor *ec);
 
+void
+screenshooter_destroy(struct screenshooter *s);
+
 uint32_t *
 weston_load_image(const char *filename,
 		  int32_t *width_arg, int32_t *height_arg,