mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-12-20 08:56:27 -05:00
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.
This commit is contained in:
parent
4da976bfad
commit
5885679e33
9 changed files with 21 additions and 12 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue