From bde5a1f4ea1fb0e966afd4b1a8aa59a8a71e4ea9 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Sat, 27 Apr 2019 12:25:40 +0300 Subject: output: introduce wlr_output_schedule_done This commit introduces wlr_output_schedule_done and refactors the mechanism used to send wl_output events to clients. wlr_output_schedule_done schedules a wl_output.done event. This allows clients to see wlr_output property changes as atomic. This function is also useful for add-on interfaces like xdg_output which need to trigger a wl_output.done event to apply their new state. --- include/wlr/types/wlr_output.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'include/wlr') diff --git a/include/wlr/types/wlr_output.h b/include/wlr/types/wlr_output.h index a526b0cf..723ef4ca 100644 --- a/include/wlr/types/wlr_output.h +++ b/include/wlr/types/wlr_output.h @@ -125,6 +125,7 @@ struct wlr_output { } events; struct wl_event_source *idle_frame; + struct wl_event_source *idle_done; struct wl_list cursors; // wlr_output_cursor::link struct wlr_output_cursor *hardware_cursor; @@ -194,7 +195,14 @@ bool wlr_output_set_custom_mode(struct wlr_output *output, int32_t width, void wlr_output_set_transform(struct wlr_output *output, enum wl_output_transform transform); void wlr_output_set_scale(struct wlr_output *output, float scale); -void wlr_output_set_subpixel(struct wlr_output *output, enum wl_output_subpixel subpixel); +void wlr_output_set_subpixel(struct wlr_output *output, + enum wl_output_subpixel subpixel); +/** + * Schedule a done event. + * + * This is intended to be used by wl_output add-on interfaces. + */ +void wlr_output_schedule_done(struct wlr_output *output); void wlr_output_destroy(struct wlr_output *output); /** * Computes the transformed output resolution. -- cgit v1.2.3