From bc344619776f4ad34dc12994653e2aa3abad110c Mon Sep 17 00:00:00 2001 From: John Lindgren Date: Mon, 4 Aug 2025 20:28:25 -0400 Subject: [PATCH] output: make autoEnableOutputs=no apply only to drm outputs It is not really useful for other output backends and just results in no outputs being enabled at all. (This is mainly an annoyance for developers normally running with drm but occasionally nested.) --- docs/labwc-config.5.scd | 2 +- src/output.c | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/labwc-config.5.scd b/docs/labwc-config.5.scd index 7def5b92..860391c9 100644 --- a/docs/labwc-config.5.scd +++ b/docs/labwc-config.5.scd @@ -216,7 +216,7 @@ this is for compatibility with Openbox. ** [yes|no] Automatically enable outputs at startup and when new outputs are - connected. Default is yes. + connected. This option applies only to drm outputs. Default is yes. Caution: Disabling this option will make the labwc session unusable unless an external tool such as `wlr-randr` or `kanshi` is used to diff --git a/src/output.c b/src/output.c index 42d8205d..0002865c 100644 --- a/src/output.c +++ b/src/output.c @@ -547,7 +547,13 @@ handle_new_output(struct wl_listener *listener, void *data) wlr_scene_node_raise_to_top(&output->osd_tree->node); wlr_scene_node_raise_to_top(&output->session_lock_tree->node); - if (rc.auto_enable_outputs) { + /* + * autoEnableOutputs=no only makes sense for outputs that can be + * hotplugged - currently only drm outputs. With wl/x11/headless + * it would result in no outputs being enabled at all. This check + * might need tweaking if wlroots adds other output backends. + */ + if (rc.auto_enable_outputs || !wlr_output_is_drm(wlr_output)) { configure_new_output(server, output); } -- 2.52.0