output: add presented flag to presentation event

This commit is contained in:
Kirill Primak 2021-10-14 22:40:12 +03:00 committed by Simon Ser
parent 1089b7b8d6
commit 2af8cc769a
6 changed files with 11 additions and 2 deletions

View file

@ -959,8 +959,8 @@ void wlr_output_send_present(struct wlr_output *output,
assert(event);
event->output = output;
struct timespec now;
if (event->when == NULL) {
if (event->presented && event->when == NULL) {
struct timespec now;
clockid_t clock = wlr_backend_get_presentation_clock(output->backend);
errno = 0;
if (clock_gettime(clock, &now) != 0) {