diff --git a/wayland.c b/wayland.c index 4bdc957..5fdb0d5 100644 --- a/wayland.c +++ b/wayland.c @@ -299,10 +299,18 @@ void wayland_init(struct client_state *state, int output_type) { /// Swaps front/backbuffers and dispatches pending wayland commands. void commit(struct client_state *state) { - wl_display_dispatch(state->wl_display); struct surface_list *next = state->surface_list; while (next != NULL) { - // TODO maybe need to set current egl window or whatever + wl_display_dispatch(state->wl_display); + + // TESTING maybe need to set current egl window or whatever + if (eglMakeCurrent(state->egl_display, next->data.egl_surface, + next->data.egl_surface, state->egl_context)) { + fprintf(stderr, "Made current\n"); + } else { + fprintf(stderr, "Made current failed\n"); + } + eglSwapBuffers(state->egl_display, next->data.egl_surface); next = next->next; } diff --git a/wayland.h b/wayland.h index 50da2d3..19727af 100644 --- a/wayland.h +++ b/wayland.h @@ -25,7 +25,6 @@ struct surface_list { }; struct client_state { - // TODO: move this to surface int width, height; int running; int output_type;