diff --git a/libweston/compositor.c b/libweston/compositor.c index 34631716..cabd0d45 100644 --- a/libweston/compositor.c +++ b/libweston/compositor.c @@ -7852,6 +7852,9 @@ weston_compositor_shutdown(struct weston_compositor *ec) wl_event_source_remove(ec->idle_source); wl_event_source_remove(ec->repaint_timer); + if (ec->touch_calibration) + weston_compositor_destroy_touch_calibrator(ec); + /* Destroy all outputs associated with this compositor */ wl_list_for_each_safe(output, next, &ec->output_list, link) output->destroy(output); diff --git a/libweston/libweston-internal.h b/libweston/libweston-internal.h index 7c30706f..02c4ad3b 100644 --- a/libweston/libweston-internal.h +++ b/libweston/libweston-internal.h @@ -389,6 +389,8 @@ const uint64_t * weston_drm_format_get_modifiers(const struct weston_drm_format *format, unsigned int *count_out); +void +weston_compositor_destroy_touch_calibrator(struct weston_compositor *compositor); /** * paint node * diff --git a/libweston/touch-calibration.c b/libweston/touch-calibration.c index 9dd99bba..11e59386 100644 --- a/libweston/touch-calibration.c +++ b/libweston/touch-calibration.c @@ -674,6 +674,16 @@ bind_touch_calibration(struct wl_client *client, } } +void +weston_compositor_destroy_touch_calibrator(struct weston_compositor *ec) +{ + /* TODO: handle weston_compositor::touch_calibrator destruction + * see + * https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/819#note_1345191 + */ + weston_layer_fini(&ec->calibrator_layer); +} + /** Advertise touch_calibration support * * \param compositor The compositor to init for.