mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04: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
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue