unanimated backgrounds on both monitors
This commit is contained in:
parent
b0420b41eb
commit
b20f48ebc0
2 changed files with 6 additions and 4 deletions
|
|
@ -66,6 +66,7 @@ int main(int argc, char *argv[]) {
|
||||||
int width = event.data.draw.width;
|
int width = event.data.draw.width;
|
||||||
int height = event.data.draw.height;
|
int height = event.data.draw.height;
|
||||||
render(&renderer, width, height, time, shader_path, 0);
|
render(&renderer, width, height, time, shader_path, 0);
|
||||||
|
printf("about to 🦬 swap buf %p\n", event.data.draw.surface);
|
||||||
swap_buffers(&state, event.data.draw.surface);
|
swap_buffers(&state, event.data.draw.surface);
|
||||||
printf("🦬🦬🦬 swaping a buffalo\n");
|
printf("🦬🦬🦬 swaping a buffalo\n");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -400,16 +400,17 @@ void swap_buffers(struct client_state *state, struct surface *surface) {
|
||||||
struct surface_list *next = state->surface_list;
|
struct surface_list *next = state->surface_list;
|
||||||
while (next != NULL) {
|
while (next != NULL) {
|
||||||
if (&next->data == surface) {
|
if (&next->data == surface) {
|
||||||
|
printf("swapping this buffer 🐃: %p\n", &next->data);
|
||||||
eglSwapBuffers(state->egl_display, next->data.egl_surface);
|
eglSwapBuffers(state->egl_display, next->data.egl_surface);
|
||||||
// maybe unecessary
|
// maybe unecessary TODO maybe really bad?
|
||||||
wl_display_dispatch(state->wl_display);
|
wl_display_dispatch(state->wl_display);
|
||||||
|
|
||||||
/* Request another frame */
|
/* Request another frame */
|
||||||
// TODO make sure this is done after the frame has been handled, maybe
|
//struct wl_callback *cb = wl_surface_frame(surface->wl_surface);
|
||||||
struct wl_callback *cb = wl_surface_frame(surface->wl_surface);
|
//wl_callback_add_listener(cb, &wl_surface_frame_listener, surface);
|
||||||
wl_callback_add_listener(cb, &wl_surface_frame_listener, surface);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
next = next->next;
|
||||||
}
|
}
|
||||||
fprintf(stderr, "didn't find surface for buffer swap\n");
|
fprintf(stderr, "didn't find surface for buffer swap\n");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue