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/libinput-seat.c b/src/libinput-seat.c
index 5168890..94e19f5 100644
--- a/src/libinput-seat.c
+++ b/src/libinput-seat.c
@@ -79,6 +79,9 @@
if (device == NULL)
return;
+ if (input->configure_device != NULL)
+ input->configure_device(c, device->device);
+ evdev_device_set_calibration(device);
udev_seat = (struct udev_seat *) seat;
wl_list_insert(udev_seat->devices_list.prev, &device->link);
@@ -279,7 +282,8 @@
int
udev_input_init(struct udev_input *input, struct weston_compositor *c,
- struct udev *udev, const char *seat_id)
+ struct udev *udev, const char *seat_id,
+ udev_configure_device_t configure_device)
{
enum libinput_log_priority priority = LIBINPUT_LOG_PRIORITY_INFO;
const char *log_priority = NULL;
@@ -287,6 +291,7 @@
memset(input, 0, sizeof *input);
input->compositor = c;
+ input->configure_device = configure_device;
log_priority = getenv("WESTON_LIBINPUT_LOG_PRIORITY");