both backgrounds animating when both in view
This commit is contained in:
parent
e934c1f61d
commit
c04ea2f9cc
2 changed files with 15 additions and 5 deletions
14
wayland.c
14
wayland.c
|
|
@ -101,12 +101,16 @@ 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;
|
||||
|
||||
/* Destroy this callback */
|
||||
wl_callback_destroy(cb);
|
||||
|
||||
struct surface *surface = data;
|
||||
surface->dirty = true;
|
||||
//struct client_state *state = surface->state;
|
||||
|
||||
// Don't make it stuck.
|
||||
//wl_display_dispatch(state->wl_display);
|
||||
}
|
||||
|
||||
static const struct wl_callback_listener wl_surface_frame_listener = {
|
||||
|
|
@ -377,7 +381,7 @@ struct event wait_for_event(struct client_state *state) {
|
|||
// do here
|
||||
if (next->data.dirty) {
|
||||
next->data.dirty = false;
|
||||
state->surface_list->next = next->next;
|
||||
state->surface_list_next = next->next;
|
||||
|
||||
printf("dirty %p\n", &next->data);
|
||||
|
||||
|
|
@ -434,8 +438,8 @@ void swap_buffers(struct client_state *state, struct surface *surface) {
|
|||
//wl_display_dispatch(state->wl_display);
|
||||
|
||||
/* Request another frame */
|
||||
//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);
|
||||
printf("done swapping\n");
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue