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>
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.