mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
types/wlr_output: removing the useless pointer
This commit is contained in:
parent
cf93d31736
commit
43554c1966
6 changed files with 14 additions and 21 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -239,8 +239,8 @@ void wlr_presentation_event_from_output(struct wlr_presentation_event *event,
|
|||
const struct wlr_output_event_present *output_event) {
|
||||
*event = (struct wlr_presentation_event){
|
||||
.output = output_event->output,
|
||||
.tv_sec = (uint64_t)output_event->when->tv_sec,
|
||||
.tv_nsec = (uint32_t)output_event->when->tv_nsec,
|
||||
.tv_sec = (uint64_t)output_event->when.tv_sec,
|
||||
.tv_nsec = (uint32_t)output_event->when.tv_nsec,
|
||||
.refresh = (uint32_t)output_event->refresh,
|
||||
.seq = (uint64_t)output_event->seq,
|
||||
.flags = output_event->flags,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue