diff options
author | Simon Ser <contact@emersion.fr> | 2023-12-21 11:20:09 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2023-12-21 11:28:58 +0100 |
commit | 11e3c376e7b843c1bc8ba182260437103db2ca25 (patch) | |
tree | 732bb5414163bcccaf2358d7d3f897a7a25628c0 | |
parent | b03216178565d44c5ef7c1308eb22e6c5c6f9d28 (diff) |
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
-rw-r--r-- | types/wlr_output_layout.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |