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/rotation.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'examples/rotation.c') diff --git a/examples/rotation.c b/examples/rotation.c index 28f82382..1dcbc80f 100644 --- a/examples/rotation.c +++ b/examples/rotation.c @@ -145,10 +145,11 @@ int main(int argc, char *argv[]) { wlr_texture_upload_pixels(state.cat_texture, WL_SHM_FORMAT_ABGR8888, cat_tex.width, cat_tex.width, cat_tex.height, cat_tex.pixel_data); - compositor_run(&compositor); + wl_display_run(compositor.display); wlr_texture_destroy(state.cat_texture); wlr_renderer_destroy(state.renderer); + compositor_fini(&compositor); example_config_destroy(state.config); } -- cgit v1.2.3