From c9d5a0b2fb5686627344922138c3c603cae364bc Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Tue, 20 Jun 2017 15:29:27 -0400 Subject: Clean up Wayland backend GL context and such --- example/shared.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'example/shared.c') diff --git a/example/shared.c b/example/shared.c index be1bdee7..0fe7270f 100644 --- a/example/shared.c +++ b/example/shared.c @@ -418,8 +418,6 @@ static void output_remove_notify(struct wl_listener *listener, void *data) { } void compositor_init(struct compositor_state *state) { - memset(state, 0, sizeof(struct compositor_state)); - state->display = wl_display_create(); state->event_loop = wl_display_get_event_loop(state->display); state->session = wlr_session_start(state->display); @@ -457,14 +455,14 @@ void compositor_init(struct compositor_state *state) { state->backend = wlr; clock_gettime(CLOCK_MONOTONIC, &state->last_frame); -} -void compositor_run(struct compositor_state *state) { if (!wlr_backend_init(state->backend)) { fprintf(stderr, "Failed to initialize backend\n"); exit(1); } +} +void compositor_run(struct compositor_state *state) { while (!state->exit) { wl_event_loop_dispatch(state->event_loop, 0); } -- cgit v1.2.3