This commit is contained in:
Rakarake 2026-02-07 15:40:20 +01:00
parent 9912c8ce58
commit 60f8b89c2b

View file

@ -48,7 +48,6 @@ static void xdg_toplevel_configure (
while (next->data.xdg_toplevel != xdg_toplevel) { next = next->next; }
next->data.width = width;
next->data.height = height;
printf("🧟🧟🧟\n");
wl_egl_window_resize(next->data.egl_window, width, height, 0, 0);
// draw new frame!
next->data.dirty = true;
@ -80,7 +79,6 @@ static void zwlr_layer_surface_v1_configure(void *data, struct zwlr_layer_surfac
next->data.height = height;
wl_egl_window_resize(next->data.egl_window, width, height, 0, 0);
zwlr_layer_surface_v1_ack_configure(zwlr_layer_surface_v1, serial);
printf("🐍🐍🐍🐍, setting layer to dirty: %p\n", &next->data);
// draw new frame!
next->data.dirty = true;
}
@ -99,8 +97,6 @@ static const struct wl_callback_listener wl_surface_frame_listener;
static void
wl_surface_frame_done(void *data, struct wl_callback *cb, uint32_t time) {
printf("FRAME CALLBACK 🐷🐷\n");
struct surface *surface = data;
struct client_state *state = surface->state;
@ -291,7 +287,6 @@ static void registry_handle_global(
// frame callback
struct wl_callback *cb = wl_surface_frame(wl_surface);
wl_callback_add_listener(cb, &wl_surface_frame_listener, surface_location);
printf("zwlr layer callback configured 🐯🐯🐯🐯🐯🐯🐯\n");
}
}
@ -443,8 +438,6 @@ struct event wait_for_event(struct client_state *state) {
next->data.dirty = false;
state->surface_list_next = next->next;
printf("dirty %p\n", &next->data);
if (eglMakeCurrent(state->egl_display, next->data.egl_surface,
next->data.egl_surface, state->egl_context)) {
} else {
@ -488,12 +481,8 @@ void print_surface_list(struct client_state *state) {
void swap_buffers(struct client_state *state, struct surface *surface) {
struct surface_list *next = state->surface_list;
print_surface_list(state);
while (next != NULL) {
printf("going to swap buffers 🐃🐃🐃: %p, surface: %p\n", &next->data, surface);
if (&next->data == surface) {
printf("swapping this buffer 🐃: %p\n", &next->data);
// Set time after eglSwapBuffers.
eglSwapInterval(state->egl_display, 0);
eglSwapBuffers(state->egl_display, next->data.egl_surface);
@ -501,10 +490,8 @@ void swap_buffers(struct client_state *state, struct surface *surface) {
/* Request another frame */
struct wl_callback *cb = wl_surface_frame(surface->wl_surface);
wl_callback_add_listener(cb, &wl_surface_frame_listener, surface);
printf("done swapping\n");
return;
}
printf("next BUF: %p\n", next->next);
next = next->next;
}
fprintf(stderr, "didn't find surface for buffer swap\n");