diff options
author | Simon Ser <contact@emersion.fr> | 2019-05-25 18:51:28 +0300 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-06-07 09:06:11 -0400 |
commit | 6c659da98b1f66596401d3294abfae49b55493e6 (patch) | |
tree | 421a3dc8c0dcd89d5d4e7ddea5317258552232d6 /include/wlr | |
parent | e554c593f9474a5d3a6c0b43d831a010a644980b (diff) |
output: introduce wlr_output_lock_attach_render
This allows screen shooters and screen grabbers to ensure rendering will be
used instead of direct scan-out.
Diffstat (limited to 'include/wlr')
-rw-r--r-- | include/wlr/types/wlr_output.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/wlr/types/wlr_output.h b/include/wlr/types/wlr_output.h index cd05cfb4..dff9f4eb 100644 --- a/include/wlr/types/wlr_output.h +++ b/include/wlr/types/wlr_output.h @@ -137,6 +137,8 @@ struct wlr_output { struct wl_event_source *idle_frame; struct wl_event_source *idle_done; + int attach_render_locks; // number of locks forcing rendering + struct wl_list cursors; // wlr_output_cursor::link struct wlr_output_cursor *hardware_cursor; int software_cursor_locks; // number of locks forcing software cursors @@ -288,6 +290,13 @@ bool wlr_output_export_dmabuf(struct wlr_output *output, struct wlr_dmabuf_attributes *attribs); struct wlr_output *wlr_output_from_resource(struct wl_resource *resource); /** + * Locks the output to only use rendering instead of direct scan-out. This is + * useful if direct scan-out needs to be temporarily disabled (e.g. during + * screen capture). There must be as many unlocks as there have been locks to + * restore the original state. There should never be an unlock before a lock. + */ +void wlr_output_lock_attach_render(struct wlr_output *output, bool lock); +/** * Locks the output to only use software cursors instead of hardware cursors. * This is useful if hardware cursors need to be temporarily disabled (e.g. * during screen capture). There must be as many unlocks as there have been |