[PATCH v2 0/4] Add clipboard status notification to VNC

Lukasz Kornicki <[email protected]>
Newsgroups gmane.comp.emulators.qemu
Message-ID <[email protected]>
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 this only works if the unregistering peer has ownership over the
clipboard, otherwise the loss of peer is silent.

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.

A new qemu submessage (VNC_MSG_SERVER_QEMU_CLIPBOARD_STATUS) used to
carry the guest peer status was added to ui/vnc. It will be emitted
when the server receives the pseudo-encoding enabling this feature
and when a ClipboardPeer with .guest=true register or unregisters.

The commit adding the new vnc feature is preceeded by 3 commits adding the
prerequisite functionality, making it 4 parts in total:

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.
    Currently it's inlined in vnc_server_cut_text_caps.

4. Add the new vnc feature, register the clipboard peer for update
    notifications, emit peer status message on set_encodings and
    on peer updates.

Changes from v1:
- Removed spurious change ids from commit-msg hook
- Added some missing context to cover letter

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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.