diff options
Diffstat (limited to 'include/wlr')
-rw-r--r-- | include/wlr/interfaces/wlr_output.h | 2 | ||||
-rw-r--r-- | include/wlr/types/wlr_output.h | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/include/wlr/interfaces/wlr_output.h b/include/wlr/interfaces/wlr_output.h index 4860a5b6..4cbf0d67 100644 --- a/include/wlr/interfaces/wlr_output.h +++ b/include/wlr/interfaces/wlr_output.h @@ -15,7 +15,7 @@ #include <wlr/types/wlr_output.h> struct wlr_output_impl { - void (*enable)(struct wlr_output *output, bool enable); + bool (*enable)(struct wlr_output *output, bool enable); bool (*set_mode)(struct wlr_output *output, struct wlr_output_mode *mode); bool (*set_custom_mode)(struct wlr_output *output, int32_t width, int32_t height, int32_t refresh); diff --git a/include/wlr/types/wlr_output.h b/include/wlr/types/wlr_output.h index 3a9f3c41..ded57959 100644 --- a/include/wlr/types/wlr_output.h +++ b/include/wlr/types/wlr_output.h @@ -124,11 +124,15 @@ struct wlr_output_event_swap_buffers { struct wlr_surface; -void wlr_output_enable(struct wlr_output *output, bool enable); +/** + * Enables or disables the output. A disabled output is turned off and doesn't + * emit `frame` events. + */ +bool wlr_output_enable(struct wlr_output *output, bool enable); void wlr_output_create_global(struct wlr_output *output); void wlr_output_destroy_global(struct wlr_output *output); /** - * Sets the output mode. + * Sets the output mode. Enables the output if it's currently disabled. */ bool wlr_output_set_mode(struct wlr_output *output, struct wlr_output_mode *mode); |