From b20f48ebc0fd2b37042969c4d6465bfdb7dc0450 Mon Sep 17 00:00:00 2001 From: Rakarake Date: Tue, 27 Jan 2026 17:18:30 +0100 Subject: [PATCH] unanimated backgrounds on both monitors --- glonkers.c | 1 + wayland.c | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/glonkers.c b/glonkers.c index baa70ab..081b737 100644 --- a/glonkers.c +++ b/glonkers.c @@ -66,6 +66,7 @@ int main(int argc, char *argv[]) { int width = event.data.draw.width; int height = event.data.draw.height; 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); printf("🦬🦬🦬 swaping a buffalo\n"); } diff --git a/wayland.c b/wayland.c index 34a2e65..b4aef6e 100644 --- a/wayland.c +++ b/wayland.c @@ -400,16 +400,17 @@ void swap_buffers(struct client_state *state, struct surface *surface) { struct surface_list *next = state->surface_list; while (next != NULL) { if (&next->data == surface) { + printf("swapping this buffer 🐃: %p\n", &next->data); eglSwapBuffers(state->egl_display, next->data.egl_surface); - // maybe unecessary + // maybe unecessary TODO maybe really bad? wl_display_dispatch(state->wl_display); /* 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); - wl_callback_add_listener(cb, &wl_surface_frame_listener, surface); + //struct wl_callback *cb = wl_surface_frame(surface->wl_surface); + //wl_callback_add_listener(cb, &wl_surface_frame_listener, surface); return; } + next = next->next; } fprintf(stderr, "didn't find surface for buffer swap\n"); }