touch-calibration: Clean-up if touch calibrator has been enabled

Seems that we're still missing layer clean-ups, with the touch
calibrator being one of them. Call the appropriate function when
shutting down the compositor instance.

Fixes: #603

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
dev
Marius Vlad 3 years ago committed by Pekka Paalanen
parent 8aa1c30bf1
commit 3bedb70454
  1. 3
      libweston/compositor.c
  2. 2
      libweston/libweston-internal.h
  3. 10
      libweston/touch-calibration.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);

@ -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
*

@ -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.

Loading…
Cancel
Save