[PATCH v2 00/13] Clipboard fixes (for 6.1?)

marcandre.lureau@redhat.com posted 13 patches 4 years, 6 months ago
Test checkpatch failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210721084139.1124779-1-marcandre.lureau@redhat.com
There is a newer version of this series
include/ui/clipboard.h |  11 ++
include/ui/gtk.h       |   1 -
ui/clipboard.c         |  24 +++++
ui/gtk-clipboard.c     |  30 +++---
ui/vdagent.c           | 225 +++++++++++++++++++++++++----------------
5 files changed, 188 insertions(+), 103 deletions(-)
[PATCH v2 00/13] Clipboard fixes (for 6.1?)
Posted by marcandre.lureau@redhat.com 4 years, 6 months ago
From: Marc-André Lureau <marcandre.lureau@redhat.com>

Hi,

Here is a few fixes I have collected while working on clipboard-related code.

There are some obvious code improvements/fixes, and better handling of release &
unregister to avoid dangling pointers and improve user experience.

v2:
 - replaced "ui/vdagent: unregister clipboard peer on finalize" with "ui/vdagent: disconnect handlers and reset state on finalize" patch.
 - added "ui/vdagent: reset outbuf on disconnect"
 - commit message tweaks

Marc-André Lureau (13):
  ui/vdagent: fix leak on error path
  ui/vdagent: remove copy-pasta comment
  ui/gtk-clipboard: use existing macros
  ui/gtk-clipboard: fix clipboard enum typo
  ui/clipboard: add helper to retrieve current clipboard
  ui/clipboard: release owned grabs on unregister
  ui/vdagent: disconnect handlers and reset state on finalize
  ui/vdagent: reset outbuf on disconnect
  ui/vdagent: split clipboard recv message handling
  ui/vdagent: use qemu_clipboard_info helper
  ui/gtk-clipboard: use qemu_clipboard_info helper
  ui/vdagent: send release when no clipboard owner
  ui/gtk-clipboard: emit release clipboard events

 include/ui/clipboard.h |  11 ++
 include/ui/gtk.h       |   1 -
 ui/clipboard.c         |  24 +++++
 ui/gtk-clipboard.c     |  30 +++---
 ui/vdagent.c           | 225 +++++++++++++++++++++++++----------------
 5 files changed, 188 insertions(+), 103 deletions(-)

-- 
2.32.0.264.g75ae10bc75



Re: [PATCH v2 00/13] Clipboard fixes (for 6.1?)
Posted by Marc-André Lureau 4 years, 6 months ago
Hi Gerd,

On Wed, Jul 21, 2021 at 12:41 PM <marcandre.lureau@redhat.com> wrote:

> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> Hi,
>
> Here is a few fixes I have collected while working on clipboard-related
> code.
>
> There are some obvious code improvements/fixes, and better handling of
> release &
> unregister to avoid dangling pointers and improve user experience.
>
> v2:
>  - replaced "ui/vdagent: unregister clipboard peer on finalize" with
> "ui/vdagent: disconnect handlers and reset state on finalize" patch.
>  - added "ui/vdagent: reset outbuf on disconnect"
>  - commit message tweaks
>
>
I am still improving this series, but any feedback is welcome.

I am wondering if we should add a migration blocker for 6.1. VNC clients
are reconnected on migration, but migration shouldn't be visible to guest
agent. What do you think?

thanks



> Marc-André Lureau (13):
>   ui/vdagent: fix leak on error path
>   ui/vdagent: remove copy-pasta comment
>   ui/gtk-clipboard: use existing macros
>   ui/gtk-clipboard: fix clipboard enum typo
>   ui/clipboard: add helper to retrieve current clipboard
>   ui/clipboard: release owned grabs on unregister
>   ui/vdagent: disconnect handlers and reset state on finalize
>   ui/vdagent: reset outbuf on disconnect
>   ui/vdagent: split clipboard recv message handling
>   ui/vdagent: use qemu_clipboard_info helper
>   ui/gtk-clipboard: use qemu_clipboard_info helper
>   ui/vdagent: send release when no clipboard owner
>   ui/gtk-clipboard: emit release clipboard events
>
>  include/ui/clipboard.h |  11 ++
>  include/ui/gtk.h       |   1 -
>  ui/clipboard.c         |  24 +++++
>  ui/gtk-clipboard.c     |  30 +++---
>  ui/vdagent.c           | 225 +++++++++++++++++++++++++----------------
>  5 files changed, 188 insertions(+), 103 deletions(-)
>
> --
> 2.32.0.264.g75ae10bc75
>
>
>