diff options
author | Giulio Camuffo <giuliocamuffo@gmail.com> | 2014-10-11 23:56:24 +0300 |
---|---|---|
committer | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2015-07-10 11:59:08 +0300 |
commit | 459137bfe6b738ee0c09f7160342403f8438c310 (patch) | |
tree | 20c598966f77e6ea7550a5a24edcef0f5380ebf7 /src/compositor-x11.c | |
parent | d3553c721c0fed07f85b70fea418ca65ed974fbb (diff) | |
download | weston-459137bfe6b738ee0c09f7160342403f8438c310.tar.gz |
compositor: add API to manage compositor instances
This commit adds three new exported functions:
- weston_compositor_create() returns a new weston_compositor instance,
initializing it as the now removed weston_compositor_init() did.
- weston_compositor_exit(compositor) asks the compositor to tear
down by calling the compositor's exit vfunc which is set by the
libweston application.
- weston_compositor_destroy(compositor) is called by the libweston
application when tearing down the compositor. The compositor is destroyed
and the memory freed.
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Diffstat (limited to 'src/compositor-x11.c')
-rw-r--r-- | src/compositor-x11.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/compositor-x11.c b/src/compositor-x11.c index 8ca809ae..55c85edc 100644 --- a/src/compositor-x11.c +++ b/src/compositor-x11.c @@ -960,7 +960,7 @@ x11_backend_delete_window(struct x11_backend *b, xcb_window_t window) xcb_flush(b->conn); if (wl_list_empty(&b->compositor->output_list)) - wl_display_terminate(b->compositor->wl_display); + weston_compositor_exit(b->compositor); } static void delete_cb(void *data) @@ -1534,9 +1534,6 @@ x11_backend_create(struct weston_compositor *compositor, return NULL; b->compositor = compositor; - if (weston_compositor_init(compositor, argc, argv, config) < 0) - goto err_free; - if (weston_compositor_set_presentation_clock_software(compositor) < 0) goto err_free; |