aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2020-07-02 17:22:38 +0200
committerDrew DeVault <sir@cmpwn.com>2020-08-27 13:54:19 -0600
commitc674241ec0d96a4df42eda00da2894f3e5972710 (patch)
tree73db8449c3c71924a535bab6130e0be19b093226 /include
parent6949d0fd381dcb5df61d78b34b325473a113f279 (diff)
output: introduce wlr_output_event_commit
This event contains a `committed` bitfield, which allows callers to know which output fields changed during the commit. This allows users to setup a single atomic commit listener, instead of setting up one listener for each event (mode, scale, transform, and so on). References: https://github.com/swaywm/wlroots/issues/2098
Diffstat (limited to 'include')
-rw-r--r--include/wlr/types/wlr_output.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/wlr/types/wlr_output.h b/include/wlr/types/wlr_output.h
index 075d09a1..41423b58 100644
--- a/include/wlr/types/wlr_output.h
+++ b/include/wlr/types/wlr_output.h
@@ -163,7 +163,7 @@ struct wlr_output {
// Emitted right before commit
struct wl_signal precommit; // wlr_output_event_precommit
// Emitted right after commit
- struct wl_signal commit;
+ struct wl_signal commit; // wlr_output_event_commit
// Emitted right after the buffer has been presented to the user
struct wl_signal present; // wlr_output_event_present
struct wl_signal enable;
@@ -198,6 +198,11 @@ struct wlr_output_event_precommit {
struct timespec *when;
};
+struct wlr_output_event_commit {
+ struct wlr_output *output;
+ uint32_t committed; // bitmask of enum wlr_output_state_field
+};
+
enum wlr_output_present_flag {
// The presentation was synchronized to the "vertical retrace" by the
// display hardware such that tearing does not happen.