Currently, a vnc client has no reliable way of determining if a
guest side clipboard peer is present. Using VNC_ENCODING_CLIPBOARD_EXT
allows the client to try and infer peer presence based on NOTIFY event,
but that is limited to cases where the unregistering peer had ownership
over the clipboard.
This series' goal is to enable vnc clients to determine if a guest side
peer is present, and to be notified of changes to its presence.
This is achieved in 4 commits:
1. Add PEER_UPDATE notification to ui/clipboard and call it on each
register/unregister.
2. Add *guest* field to ClipboardPeer, which indicates that a peer is
guest side. Currently it's only set on vdagent's cbpeer.
3. Factor out vnc peer registration into a separate function.
4. Add the new vnc feature, register the clipboard peer for update
notifications, emit the message on set_encodings and peer updates.
Lukasz Kornicki (4):
ui/clipboard: add clipboard peer update notification
ui/clipboard: keep track of clipboard peer side
ui/vnc-clipboard: factor out clipboard peer registration
ui/vnc: notify client of clipboard peer status
include/ui/clipboard.h | 27 +++++++++++++++++++++
tools/qemu-vnc/clipboard.c | 3 +++
ui/clipboard.c | 33 +++++++++++++++++++++++++
ui/cocoa.m | 3 +++
ui/dbus-clipboard.c | 3 +++
ui/gtk-clipboard.c | 3 +++
ui/trace-events | 2 ++
ui/vdagent.c | 4 ++++
ui/vnc-clipboard.c | 49 +++++++++++++++++++++++++++++++++-----
ui/vnc.c | 6 +++++
ui/vnc.h | 9 +++++++
11 files changed, 136 insertions(+), 6 deletions(-)
--
2.43.0