types/wlr_output: removing the useless pointer

This commit is contained in:
YaoBing Xiao 2024-08-20 17:45:13 +08:00 committed by Alexander Orzechowski
parent cf93d31736
commit 43554c1966
6 changed files with 14 additions and 21 deletions

View file

@ -794,14 +794,12 @@ void wlr_output_send_present(struct wlr_output *output,
assert(event);
event->output = output;
struct timespec now;
if (event->presented && event->when == NULL) {
if (clock_gettime(CLOCK_MONOTONIC, &now) != 0) {
if (event->presented && (event->when.tv_sec == 0 && event->when.tv_nsec == 0)) {
if (clock_gettime(CLOCK_MONOTONIC, &event->when) != 0) {
wlr_log_errno(WLR_ERROR, "failed to send output present event: "
"failed to read clock");
return;
}
event->when = &now;
}
wl_signal_emit_mutable(&output->events.present, event);