]> git.mdlowis.com Git - proto/labwc.git/commitdiff
output: make autoEnableOutputs=no apply only to drm outputs
authorJohn Lindgren <john@jlindgren.net>
Tue, 5 Aug 2025 00:28:25 +0000 (20:28 -0400)
committerConsolatis <35009135+Consolatis@users.noreply.github.com>
Tue, 5 Aug 2025 02:18:43 +0000 (04:18 +0200)
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
src/output.c

index 7def5b9207fef91c2060ff8193168e73de397fa3..860391c9f7719fb92e68770b89c02895d65ae8ec 100644 (file)
@@ -216,7 +216,7 @@ this is for compatibility with Openbox.
 
 *<core><autoEnableOutputs>* [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
index 42d8205d7c6029dac79f91c2dba29659122e0c8a..0002865c6993565db9c58a949d508a22e38bc818 100644 (file)
@@ -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);
        }