mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-09 13:29:46 -05:00
Clean up Wayland backend GL context and such
This commit is contained in:
parent
51f35e7af0
commit
c9d5a0b2fb
8 changed files with 48 additions and 44 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue