diff options
author | Rose Hudson <rose@krx.sh> | 2023-08-26 16:01:46 +0100 |
---|---|---|
committer | Alexander Orzechowski <alex@ozal.ski> | 2023-10-02 12:34:06 +0000 |
commit | 83af3202f94fa49822039f051070be1491854c24 (patch) | |
tree | 49548c6845e628cdf7ab620fce8b96f29f23b8c6 /backend | |
parent | a1679c92ce77185843050d6633b4d55e425211d7 (diff) |
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.
Diffstat (limited to 'backend')
-rw-r--r-- | backend/headless/output.c | 2 | ||||
-rw-r--r-- | backend/wayland/output.c | 2 |
2 files changed, 2 insertions, 2 deletions
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); } } |