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-fbdev.h b/src/compositor-fbdev.h
index bd60bdc..450be5d 100644
--- a/src/compositor-fbdev.h
+++ b/src/compositor-fbdev.h
@@ -34,6 +34,8 @@
#define WESTON_FBDEV_BACKEND_CONFIG_VERSION 1
+struct libinput_device;
+
struct weston_fbdev_backend_config {
struct weston_backend_config base;
@@ -42,6 +44,15 @@
int use_gl;
uint32_t output_transform;
+
+ /** 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);
};
#ifdef __cplusplus