The wayland callbacks are generally done in another thread, so it was possible to be servicing a flush from the /dev/draw side while also getting a callback.
Unified · Split
| @@ -80,7 +80,9 @@ wl_surface_frame_done(void *data, struct wl_callback *cb, uint32_t time) · 79 unmodified lines | ||
| 80 | 80 | wl_callback_destroy(cb); |
| 81 | 81 | cb = wl_surface_frame(wl->surface); |
| 82 | 82 | wl_callback_add_listener(cb, &wl_surface_frame_listener, wl); |
| 83 | + qlock(&drawlock); | |
| 83 | 84 | wlflush(wl); |
| 85 | + qunlock(&drawlock); | |
| 84 | 86 | } |
| 85 | 87 | |
| 86 | 88 | static void |