libinput: don't use weston_config when configuring input devices

Instead add callbacks to the drm and fbdev backends and pass that to
the input backens so that when a new device needs to be configured
that is called and the compositor can configure it.

Signed-off-by: Giulio Camuffo <giuliocamuffo@gmail.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
diff --git a/src/compositor-drm.h b/src/compositor-drm.h
index 3f150db..1266031 100644
--- a/src/compositor-drm.h
+++ b/src/compositor-drm.h
@@ -36,6 +36,8 @@
 
 #define WESTON_DRM_BACKEND_CONFIG_VERSION 1
 
+struct libinput_device;
+
 enum weston_drm_backend_output_mode {
 	/** The output is disabled */
 	WESTON_DRM_BACKEND_OUTPUT_OFF,
@@ -117,6 +119,15 @@
 				    bool use_current_mode,
 				    const char *name,
 				    struct weston_drm_backend_output_config *output_config);
+
+	/** Callback used to configure input devices.
+	 *
+	 * This function will be called by the backend when a new input device
+	 * needs to be configured.
+	 * If NULL the device will use the default configuration.
+	 */
+	void (*configure_device)(struct weston_compositor *compositor,
+				 struct libinput_device *device);
 	bool use_current_mode;
 };