Andri Yngvason
27a8008edf
Emit "detached" control event
2023-11-19 20:47:39 +00:00
Andri Yngvason
9647d1089a
Implement detached mode
...
This makes it possible to attach to a compositor at a later time and to
detach and re-attach.
2023-11-19 20:47:39 +00:00
Andri Yngvason
27cd6351be
ctl-server: Add null-check for info.seat
2023-10-14 10:43:08 +00:00
Andri Yngvason
87c034db43
Add seat name to client-connected event
2023-04-29 19:35:24 +00:00
Andri Yngvason
d53a04b5b0
Remove unnecessary copying when listing clients
2023-04-29 19:35:24 +00:00
Andri Yngvason
51f868c6ff
Iterate over clients instead of listing
...
This model avoids memory allocations and allows for re-use of
the info function for client events.
2023-04-29 19:35:24 +00:00
Andri Yngvason
1c9a8c0769
Show seat in client list
2023-04-29 19:35:24 +00:00
Jim Ramsay
fd652e7a23
Fix all non-parameterized IPCs
...
Reverts part of 0b970ba3
which disabled all IPCs that don't take
parameters.
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2023-01-26 22:53:08 -05:00
Andri Yngvason
f49aea40a4
ctl-server: Improve error messages for missing arguments
2023-01-17 20:05:17 +00:00
Andri Yngvason
0b970ba355
ctl-server: Fix segfault in error path
...
This would segfault e.g. if issuing:
$ waynvcctl client-disconnect # without argument
2023-01-17 20:05:17 +00:00
Jim Ramsay
a28ce15521
Split wayvnctl output-set into output-set and output-cycle
...
Rather than optional params, unique commands are easier to use.
This also removes the ability to cycle through in reverse since the list
order is already arbitrary.
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2023-01-08 18:23:45 -05:00
Jim Ramsay
8df085a65a
Rename and reorder all wayvncctl commands
...
This introduces a better hierarchical naming convention for IPC
commands.
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2023-01-08 13:51:10 -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
d75ca4bf51
Refactor comand and event name parsing
...
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-12-07 19:56:06 -05: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
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
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
c86e2a756e
Cleanup stale unix socket, iff inactive
...
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-11-13 23:06:43 +00:00
Andri Yngvason
13aa584075
ctl-server: Fix sign-compare warning
2022-11-13 15:57:27 +00:00
Jim Ramsay
debd8a67cb
Added event help text
...
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-11-12 20:11:00 +00:00
Jim Ramsay
c75b64eae8
Add server event infrastructure
...
Includes "client-connect" and "client-disconnect" events as
proof-of-concept.
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-11-12 20:11:00 +00:00
Jim Ramsay
c859c50463
Ensure fatal errors are sent first
...
Once we start enqueueing asynchronous events, it's more important to
send fatal errors (which then disconnect) imediately by prepending them
to the send queue. Everything else is still processed FIFO.
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-11-12 20:11:00 +00:00
Jim Ramsay
1275609aee
Allow 'wayvncctl foo --help' syntax
...
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-11-10 18:02:59 +00:00
Jim Ramsay
15735b3256
Add wayvncctl version command
...
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-11-10 18:02:59 +00:00
Jim Ramsay
73fd2e386f
Add wayvnctl help command
...
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-11-10 18:02:59 +00:00
Jim Ramsay
be42c8b7bf
Add ctl-client code
...
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-11-10 18:02:59 +00:00
Jim Ramsay
5043f8e149
Refactor some common utilities out of main
...
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-11-10 18:02:59 +00:00
Jim Ramsay
1a0e8aae97
Add ctl control socket and initial command infrastructure
...
This implements the first wayvncctl command: set-output
Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-11-10 18:02:59 +00:00