Commit Graph

568 Commits (6e1d8aaddc0f9c87e31f0bda6ba2343409be2e58)

Author SHA1 Message Date
Jim Ramsay e0a4a26c42 Cleanup CI reporting and step names
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2023-01-02 11:27:22 -05:00
Jim Ramsay 14615ae3b0 Enable unit tests by default
Also documents how to run the tests.

Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2023-01-02 07:47:47 -05:00
Jim Ramsay 7c8c52dfb2 Run github CI on a ci-test branch too
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2023-01-02 07:09:54 -05:00
Jim Ramsay 4b126da54c Add unit tests to github CI
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2023-01-02 07:05:52 -05:00
Andri Yngvason 65ed029e22 Add meson.build for unit tests 2023-01-02 09:32:15 +00:00
Andri Yngvason 474ce23d42 Implement custom option parser 2023-01-01 09:12:29 +00:00
Jim Ramsay 86652c8a42 Fixup buffer.c compiler warning
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-12-29 05:50:44 -05:00
Jim Ramsay 92e79bb971 Add more error logs for wayland init failures
This should help with troubleshooting issues like #206 more quickly.

Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-12-29 01:25:00 -05:00
Jim Ramsay 72cc04098d Add single-output-sway helper script
For sway 1.7, this disables all but one output on connect, then restores
everything on disconnect.

For sway 1.8 and later, creates a virtual HEADLESS output, disables all
others, then restores everything on disconnect.

Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-12-25 21:43:55 -05:00
Jim Ramsay 2f2f6f410b Force a wayland round-trip after an output appears
This way outputs are always fully initialized.

Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-12-25 21:31:49 -05:00
Jim Ramsay 5cf9ad6eab Increase client receive buffer size
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-12-21 09:18:46 -05:00
Jim Ramsay 5d443bfa60 Improve error message for client receive buffer overflow
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-12-21 09:18:46 -05:00
Jim Ramsay 3e5d6ea8eb Fix segfault after hot-plugging outputs
When new outputs appear, either because they were just created or
because they have been disabled/reenabled, ensure we always set up the
right xdg_output and wlr_output_power listeners.

Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-12-19 16:20:56 -05:00
Jim Ramsay 2a9e3dac58 Fix trace logging assert crash
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-12-09 02:43:03 -05:00
Jim Ramsay 43e3015af6 Refresh and cleanup README.md
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-12-07 21:27:04 -05:00
Jim Ramsay 00539935ba Add output power state to get_outputs ipc command
I forgot to plumb this through when I did the initial state on the
output power state.

Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-12-07 19:56:37 -05:00
Jim Ramsay cb116cc980 Handle all wayvncctl help commands locally
This means that wayvncctl can now provide full descriptions of all
commands and events without wayvnc running.

Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-12-07 19:56:06 -05:00
Jim Ramsay d75ca4bf51 Refactor comand and event name parsing
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-12-07 19:56:06 -05:00
Jim Ramsay 4def8f3cb8 Switch wayvncctl to use option_parser
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-12-07 19:56:06 -05:00
Andri Yngvason e3238cf71d output: The name the "unknown" power state is "UNKNOWN" 2022-12-01 21:30:06 +00:00
Andri Yngvason 03d7f1dc6d output: Abort on invalid power state 2022-12-01 21:27:55 +00:00
Jim Ramsay 5bb8cbfa92 Blank the capture screen when output power turns off
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-12-01 19:11:32 +00:00
Jim Ramsay 6b44a6648e Turn output power on when starting capture
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-12-01 19:11:32 +00:00
Jim Ramsay 3cba374172 Don't attempt capture if an output is powered off
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-12-01 19:11:32 +00:00
Jim Ramsay 308308b63a Add power management state to the output object
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-12-01 19:11:32 +00:00
Jim Ramsay 9639740bc8 Add more libraries to the build CI environment
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-11-28 20:44:44 +00:00
Andri Yngvason 312ddd8960 Move control command schemas into own files
This allows them to be used by ctl-client as well.
2022-11-27 10:48:03 +00:00
Andri Yngvason 052160cbd4 ctl: Fix sign compare warnings 2022-11-27 10:33:09 +00:00
Andri Yngvason c3c3e97794 main: Use stronger error checking for client ids 2022-11-27 10:33:09 +00:00
Jim Ramsay 89bd6da3bb Add a brief timeout between a capture failure and the retry
Ensures we don't spin eating CPU if capture is continually failing due
to DPMS (for example) by only trying to restart screen capture every
100ms.

Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-11-27 10:29:24 +00:00
Jim Ramsay e958b06e44 Add wayvncctl wayvnc-exit command
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-11-26 19:57:53 +00:00
Jim Ramsay 467cfa1889 Add wayvncctl capture-changed event
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-11-26 19:57:53 +00:00
Jim Ramsay 19862aace8 Cleanup magic strings in event sending code
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-11-26 19:57:53 +00:00
Jim Ramsay 5c8014d19b Add wayvncctl disconnect-client command
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-11-26 19:57:53 +00:00
Jim Ramsay 3e9aa0e3ae Ensure cmd parsing never mis-sets the type
Why leave the cmd.type to chance? Force it to the right value.

Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-11-26 19:57:53 +00:00
Jim Ramsay 80fd6b074e Add wayvncctl get-outputs command
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-11-26 19:57:53 +00:00
Andri Yngvason ac5e207321 ctl-server: Fix sign compare warning 2022-11-26 18:17:30 +00:00
Andri Yngvason 8a70c54928 buffer: Add braces to side-step bogus fallthrough warning 2022-11-26 18:16:14 +00:00
Andri Yngvason 800a460444 meson: Set default warning level to 2 2022-11-26 18:00:50 +00:00
Jim Ramsay 80efc9d487 Start capture on output switch iff clients are connected
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-11-26 14:12:59 +00:00
Jim Ramsay 19e3d78d78 Add wayvncctl get-clients command
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-11-23 09:41:46 +00:00
Jim Ramsay 72238686c4 Make better client IDs for wayvncctl
We were using a stringified pointer, but that wasnt great to leak, and
may end up being reused while wayvnc is running.

Using an unsigned int will make the IDs more generic and more unique.

Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-11-23 09:41:46 +00:00
Jim Ramsay 349693ed87 Fix segfault if running wayvncctl with no args
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-11-22 22:40:09 +00:00
Jim Ramsay 7491a319d5 Introduce a simple CI that builds wayvnc
This sets up a github action to build the master branch and every PR to
master.

Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-11-21 20:20:52 +00:00
Andri Yngvason ef2e68af70 Fixup previous commit 2022-11-21 10:09:24 +00:00
Andri Yngvason 1604b12f78 Create separate data-control for each client 2022-11-20 23:00:03 +00:00
Andri Yngvason b99120ddfc Create separate input for each client
This should clean up state for virtual input devices.

This is also a step towards multi-seat support.
2022-11-20 12:20:23 +00:00
Andri Yngvason b79ab71dca main: Add per-client state 2022-11-20 11:32:52 +00:00
Jim Ramsay fe10e46e29 Introduce wayvncctl startup amd shutdown events
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-11-19 11:58:07 +00:00
Jim Ramsay 325b45ef49 Clean up wayvncctl logging
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-11-18 09:24:31 +00:00