output: defer fake present events until after commit

Since headless and wayland-without-presentation-feedback were firing
present inside their commit impls, present was getting fired before
commit, which is cursed. Defer this with an idle timer so that commit
handlers can run before present handlers.
This commit is contained in:
Rose Hudson 2023-08-26 16:01:46 +01:00 committed by Alexander Orzechowski
parent a1679c92ce
commit 83af3202f9
4 changed files with 44 additions and 2 deletions

View file

@ -71,7 +71,7 @@ static bool output_commit(struct wlr_output *wlr_output,
.commit_seq = wlr_output->commit_seq + 1,
.presented = true,
};
wlr_output_send_present(wlr_output, &present_event);
output_defer_present(wlr_output, present_event);
wl_event_source_timer_update(output->frame_timer, output->frame_delay);
}