mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 12:55:58 +01:00
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
1 changed files with 1 additions and 1 deletions
|
@ -570,7 +570,7 @@ void wlr_output_send_present(struct wlr_output *output,
|
|||
struct wlr_output_event_present _event = {0};
|
||||
if (event == NULL) {
|
||||
event = &_event;
|
||||
event->commit_seq = output->commit_seq;
|
||||
event->commit_seq = output->commit_seq + 1;
|
||||
}
|
||||
|
||||
event->output = output;
|
||||
|
|
Loading…
Reference in a new issue