From 5885679e33b4082e727fb55e1700b67159ec9d06 Mon Sep 17 00:00:00 2001 From: Dominique Martinet Date: Sat, 19 Aug 2017 09:26:25 +0200 Subject: examples: separate compositor_fini from run compositor_fini destroys the display, but it is an error to destroy it before e.g. wlr_seat that references it. This lets us order destroy calls properly, following first-in-last-out logic. --- examples/shared.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'examples/shared.c') diff --git a/examples/shared.c b/examples/shared.c index 255652c7..f37140cf 100644 --- a/examples/shared.c +++ b/examples/shared.c @@ -674,8 +674,7 @@ void compositor_init(struct compositor_state *state) { } } -void compositor_run(struct compositor_state *state) { - wl_display_run(state->display); +void compositor_fini(struct compositor_state *state) { wlr_backend_destroy(state->backend); wl_display_destroy(state->display); } -- cgit v1.2.3