From: John Lindgren Date: Tue, 5 Aug 2025 00:28:25 +0000 (-0400) Subject: output: make autoEnableOutputs=no apply only to drm outputs X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=bc344619776f4ad34dc12994653e2aa3abad110c;p=proto%2Flabwc.git 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.) --- 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); }