Commit graph

2 commits

Author SHA1 Message Date
Consolatis
60aab98e8d Add optional headless fallback output
This allows configuring a headless fallback output that
is automatically created whenever there is no other output
around. It is destroyed when a new output is discovered.

It can be enabled by setting the environment variable
LABWC_FALLBACK_OUTPUT to the desired output name.

The feature benefits applications like wayvnc the most
as there is always an output available to connect to.

Co-Authored-By: Simon Long <simon@raspberrypi.com>
2024-03-08 13:54:13 +01:00
Consolatis
95e8573388 src/output.c: refactor virtual output related functions
This commit moves the virtual output related functions
into their own file at `src/output-virtual.c` with its
own include file to reduce `include/labwc.h` bit by bit.

Additionally, it removes the need to keep the
`server->headless.pending_output_name` char array around
by temporarily disconnecting the handler when creating a
new virtual output. This allows to set the output name
right in the `output_virtual_add()` call rather than to
store the pending name until the new output event handler
has been called.

It also makes adding a virtual fallback output easier in
a follow-up PR.
2024-03-07 19:51:54 +00:00