diff --git a/src/compositor-wayland.c b/src/compositor-wayland.c index 7e59ecd5..6c333619 100644 --- a/src/compositor-wayland.c +++ b/src/compositor-wayland.c @@ -312,8 +312,15 @@ frame_done(void *data, struct wl_callback *callback, uint32_t time) wl_callback_destroy(callback); /* XXX: use the presentation extension for proper timings */ - ts.tv_sec = time / 1000; - ts.tv_nsec = (time % 1000) * 1000000; + + /* + * This is the fallback case, where Presentation extension is not + * available from the parent compositor. We do not know the base for + * 'time', so we cannot feed it to finish_frame(). Do the only thing + * we can, and pretend finish_frame time is when we process this + * event. + */ + weston_compositor_read_presentation_clock(output->compositor, &ts); weston_output_finish_frame(output, &ts, 0); }