From 83af3202f94fa49822039f051070be1491854c24 Mon Sep 17 00:00:00 2001 From: Rose Hudson Date: Sat, 26 Aug 2023 16:01:46 +0100 Subject: 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. --- backend/headless/output.c | 2 +- backend/wayland/output.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'backend') diff --git a/backend/headless/output.c b/backend/headless/output.c index f4719a3c..a6c97dec 100644 --- a/backend/headless/output.c +++ b/backend/headless/output.c @@ -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); } diff --git a/backend/wayland/output.c b/backend/wayland/output.c index e51be4c5..2e5c39f5 100644 --- a/backend/wayland/output.c +++ b/backend/wayland/output.c @@ -590,7 +590,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); } } -- cgit v1.2.3