]> git.mdlowis.com Git - proto/labwc.git/commit
src/output.c: refactor virtual output related functions
authorConsolatis <35009135+Consolatis@users.noreply.github.com>
Wed, 6 Mar 2024 23:22:51 +0000 (00:22 +0100)
committerJohan Malm <johanmalm@users.noreply.github.com>
Thu, 7 Mar 2024 19:51:54 +0000 (19:51 +0000)
commit95e8573388db84f8c727dcdb64649c74ffcce4d8
treed4f327cb13296f8aa39ff4324a44457bbd7bd2dc
parent40ce95a68cf19796dd67b0527fddfdbe46181805
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.
include/labwc.h
include/output-virtual.h [new file with mode: 0644]
src/action.c
src/meson.build
src/output-virtual.c [new file with mode: 0644]
src/output.c