presentation-time: bump protocol version to v2

We've actually been doing the wrong thing this whole time, for v1 of the
protocol, we should set the refresh_nsec field to 0 if the output does
not have a constant refresh rate. However we've been setting it to the
fastest rate instead since eac7c2ad2f
which is incidentally exactly what v2 of the protocol proposes.

So allow advertising v2, and fix v1 to set refresh_nsec to 0.
This commit is contained in:
llyyr 2024-10-15 22:10:49 +05:30
parent e8e76dc295
commit 4c74a8843a
3 changed files with 12 additions and 5 deletions

View file

@ -56,7 +56,7 @@ struct wlr_presentation_event {
struct wlr_backend;
struct wlr_presentation *wlr_presentation_create(struct wl_display *display,
struct wlr_backend *backend);
struct wlr_backend *backend, int version);
/**
* Mark the current surface's buffer as sampled.
*