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: 5567aefb1c ("backend/drm: Don't add pollute fixed modes list with custom modes")
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3743
master
Simon Ser 11 months ago
parent b032161785
commit 11e3c376e7

@ -118,7 +118,7 @@ static void output_layout_reconfigure(struct wlr_output_layout *layout) {
static void output_update_global(struct wlr_output_layout *layout, static void output_update_global(struct wlr_output_layout *layout,
struct wlr_output *output) { struct wlr_output *output) {
// Don't expose the output if it doesn't have a current mode // 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); wlr_output_create_global(output, layout->display);
} else { } else {
wlr_output_destroy_global(output); wlr_output_destroy_global(output);

Loading…
Cancel
Save