From e5fc8cd4c734717c471567de98a77e2482a7015f Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Mon, 14 Aug 2023 19:39:33 +0200 Subject: output: trigger frame/present events on all commits on enabled output Up until now, frame/present events were only triggered when the user submitted a buffer. Change the wlr_output API so that these events are triggered when any commit is applied on an enabled output. Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3708 --- backend/headless/output.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'backend/headless/output.c') diff --git a/backend/headless/output.c b/backend/headless/output.c index 7dc7f0bc..f4719a3c 100644 --- a/backend/headless/output.c +++ b/backend/headless/output.c @@ -5,6 +5,7 @@ #include #include #include "backend/headless.h" +#include "types/wlr_output.h" static const uint32_t SUPPORTED_OUTPUT_STATE = WLR_OUTPUT_STATE_BACKEND_OPTIONAL | @@ -65,7 +66,7 @@ static bool output_commit(struct wlr_output *wlr_output, output_update_refresh(output, state->custom_mode.refresh); } - if (state->committed & WLR_OUTPUT_STATE_BUFFER) { + if (output_pending_enabled(wlr_output, state)) { struct wlr_output_event_present present_event = { .commit_seq = wlr_output->commit_seq + 1, .presented = true, -- cgit v1.2.3