aboutsummaryrefslogtreecommitdiff
path: root/backend/headless/output.c
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2023-08-14 19:39:33 +0200
committerAlexander Orzechowski <alex@ozal.ski>2023-08-23 15:42:22 +0000
commite5fc8cd4c734717c471567de98a77e2482a7015f (patch)
tree6f7e10a98dac1f207066a96e75e8a7d3fb95c948 /backend/headless/output.c
parent462f04db9e70c683a421aa015c1689fff8206781 (diff)
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
Diffstat (limited to 'backend/headless/output.c')
-rw-r--r--backend/headless/output.c3
1 files changed, 2 insertions, 1 deletions
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 <wlr/types/wlr_output_layer.h>
#include <wlr/util/log.h>
#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,