diff options
author | Simon Ser <contact@emersion.fr> | 2019-04-27 12:25:40 +0300 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-04-27 10:02:21 -0600 |
commit | bde5a1f4ea1fb0e966afd4b1a8aa59a8a71e4ea9 (patch) | |
tree | 3863ba091781291a9079b6f5d7590f386f10fe3d /include | |
parent | 8b1220f5a32376578fb2ddc39ba174f455859689 (diff) |
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.
Diffstat (limited to 'include')
-rw-r--r-- | include/wlr/types/wlr_output.h | 10 |
1 files changed, 9 insertions, 1 deletions
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. |