compositor: destroy the layout after the compositor

This way the backends will the actual outputs. And at that point the backend
knows the compositor is shutting down so it can handle this differently if
necessary.
Afterwards wet_compositor_destroy_layout() just deletes the remaining
datastructures.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
This commit is contained in:
Michael Olbrich 2022-06-22 17:28:44 +02:00 committed by Daniel Stone
parent b923802113
commit 158c3ef0dd

View File

@ -3763,8 +3763,6 @@ wet_main(int argc, char *argv[], const struct weston_testsuite_data *test_data)
ret = wet.compositor->exit_code;
out:
wet_compositor_destroy_layout(&wet);
/* free(NULL) is valid, and it won't be NULL if it's used */
free(wet.parsed_options);
@ -3772,6 +3770,7 @@ out:
wl_protocol_logger_destroy(protologger);
weston_compositor_destroy(wet.compositor);
wet_compositor_destroy_layout(&wet);
weston_log_scope_destroy(protocol_scope);
protocol_scope = NULL;