aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Orzechowski <alex@ozal.ski>2023-08-24 18:03:19 -0400
committerSimon Ser <contact@emersion.fr>2023-10-06 10:06:01 +0000
commit03e240a7f2f459863b8ea9bc47e03a503cf1f278 (patch)
tree45c6cd0f21d6b956d157476d76257e8a875daf0c
parent0b15b4a6ae6654f838ee38ce4d8862a600136c87 (diff)
wlr_output: Add applied state to commit event
-rw-r--r--include/wlr/types/wlr_output.h1
-rw-r--r--types/output/output.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/include/wlr/types/wlr_output.h b/include/wlr/types/wlr_output.h
index 95ffc670..4b5f29b1 100644
--- a/include/wlr/types/wlr_output.h
+++ b/include/wlr/types/wlr_output.h
@@ -227,6 +227,7 @@ struct wlr_output_event_commit {
uint32_t committed; // bitmask of enum wlr_output_state_field
struct timespec *when;
struct wlr_buffer *buffer; // NULL if no buffer is committed
+ const struct wlr_output_state *state;
};
enum wlr_output_present_flag {
diff --git a/types/output/output.c b/types/output/output.c
index 57b4c87e..78bec6db 100644
--- a/types/output/output.c
+++ b/types/output/output.c
@@ -836,6 +836,7 @@ bool wlr_output_commit_state(struct wlr_output *output,
.committed = pending.committed,
.when = &now,
.buffer = (pending.committed & WLR_OUTPUT_STATE_BUFFER) ? pending.buffer : NULL,
+ .state = &pending,
};
wl_signal_emit_mutable(&output->events.commit, &event);