From 2498036e673af7e82b79de85a529c07dcdaed712 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Thu, 19 Jun 2025 14:09:28 +0200 Subject: [PATCH] output: add output_pending_image_description() --- include/types/wlr_output.h | 2 ++ types/output/output.c | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/include/types/wlr_output.h b/include/types/wlr_output.h index 2dc979c66..f901505af 100644 --- a/include/types/wlr_output.h +++ b/include/types/wlr_output.h @@ -8,6 +8,8 @@ void output_pending_resolution(struct wlr_output *output, const struct wlr_output_state *state, int *width, int *height); bool output_pending_enabled(struct wlr_output *output, const struct wlr_output_state *state); +const struct wlr_output_image_description *output_pending_image_description( + struct wlr_output *output, const struct wlr_output_state *state); bool output_pick_format(struct wlr_output *output, const struct wlr_drm_format_set *display_formats, diff --git a/types/output/output.c b/types/output/output.c index 3410138c1..636d155d2 100644 --- a/types/output/output.c +++ b/types/output/output.c @@ -500,6 +500,14 @@ bool output_pending_enabled(struct wlr_output *output, return output->enabled; } +const struct wlr_output_image_description *output_pending_image_description( + struct wlr_output *output, const struct wlr_output_state *state) { + if (state->committed & WLR_OUTPUT_STATE_IMAGE_DESCRIPTION) { + return state->image_description; + } + return output->image_description; +} + /** * Compare a struct wlr_output_state with the current state of a struct * wlr_output.