From 579019a78da6aa98ee538f4b6d7cc1c4a2e92290 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Mon, 1 May 2023 19:25:14 +0100 Subject: [PATCH] libweston: Add weston_compositor.shutting_down It does what it says on the box: is true when the compositor is in the process of shutting down. Signed-off-by: Daniel Stone --- include/libweston/libweston.h | 1 + libweston/compositor.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/include/libweston/libweston.h b/include/libweston/libweston.h index c120f09f..e8de1d3d 100644 --- a/include/libweston/libweston.h +++ b/include/libweston/libweston.h @@ -1366,6 +1366,7 @@ struct weston_renderer; */ struct weston_compositor { struct wl_signal destroy_signal; + bool shutting_down; struct wl_display *wl_display; struct weston_desktop_xwayland *xwayland; diff --git a/libweston/compositor.c b/libweston/compositor.c index b70878b9..aa22fb58 100644 --- a/libweston/compositor.c +++ b/libweston/compositor.c @@ -8638,6 +8638,8 @@ weston_compositor_shutdown(struct weston_compositor *ec) { struct weston_output *output, *next; + ec->shutting_down = true; + wl_event_source_remove(ec->idle_source); wl_event_source_remove(ec->repaint_timer);