output: fix off-by-one wlr_output_event_present.commit_seq
Backends not supporting presentation feedback call wlr_output_send_present with a NULL event in their commit handler. Since the commit hasn't been applied yet, commit_seq still has its old value. We need to increment it. An alternative would be to move commit_seq in wlr_output_state. This would allow to have a pending and a current commit_seq. wlr_output_send_present could take the pending commit_seq when called with a NULL event.
This commit is contained in:
parent
2d9661f189
commit
3084cee7bc
|
@ -570,7 +570,7 @@ void wlr_output_send_present(struct wlr_output *output,
|
||||||
struct wlr_output_event_present _event = {0};
|
struct wlr_output_event_present _event = {0};
|
||||||
if (event == NULL) {
|
if (event == NULL) {
|
||||||
event = &_event;
|
event = &_event;
|
||||||
event->commit_seq = output->commit_seq;
|
event->commit_seq = output->commit_seq + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
event->output = output;
|
event->output = output;
|
||||||
|
|
Loading…
Reference in New Issue