From 11e3c376e7b843c1bc8ba182260437103db2ca25 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Thu, 21 Dec 2023 11:20:09 +0100 Subject: [PATCH] output-layout: fix missing global for outputs with a custom mode Before we were populating wlr_output.current_mode with a generated fixed mode when a custom mode was committed in the DRM backend. But that's no longer the case: now a custom mode behaves the same under the DRM backend and other backends. wlr_output_layout was still assuming that an output without a current_mode was disabled. Fix that assumption. Fixes: 5567aefb1c56 ("backend/drm: Don't add pollute fixed modes list with custom modes") Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3743 --- types/wlr_output_layout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/wlr_output_layout.c b/types/wlr_output_layout.c index fa96e74a..853ff594 100644 --- a/types/wlr_output_layout.c +++ b/types/wlr_output_layout.c @@ -118,7 +118,7 @@ static void output_layout_reconfigure(struct wlr_output_layout *layout) { static void output_update_global(struct wlr_output_layout *layout, struct wlr_output *output) { // Don't expose the output if it doesn't have a current mode - if (wl_list_empty(&output->modes) || output->current_mode != NULL) { + if (output->width > 0 && output->height > 0) { wlr_output_create_global(output, layout->display); } else { wlr_output_destroy_global(output);