qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 7/7] ui/gtk: add clipboard support


From: Gerd Hoffmann
Subject: Re: [PATCH v2 7/7] ui/gtk: add clipboard support
Date: Wed, 24 Mar 2021 15:47:00 +0100

On Wed, Mar 24, 2021 at 05:26:24PM +0400, Marc-André Lureau wrote:
> Hi
> 
> On Wed, Mar 24, 2021 at 4:57 PM Gerd Hoffmann <kraxel@redhat.com> wrote:
> 
> >   Hi,
> >
> > > I fail to see how that works, imagine the other end is the same code
> > (qemu
> > > in the guest), it will take clipboard ownership and it is in a endless
> > > loop, isn't it?
> >
> > Notifications on guest-triggered clipboard updates will not be sent back
> > to the guest, exactly to avoid that kind of loop.  See self_update
> > checks in vdagent_clipboard_notify().  gtk and vnc notify callbacks have
> > simliar checks for simliar reasons ;)

> That means the other side may have wrong clipboard expectations. It may ask
> for what was previously an image and that will fails.

Should not happen.  qemu keeps track of the clipboard source
(vnc/gtk/vdgent) and uses that to filter notifications.

So when the guest (i.e. vdagent source inside qemu) grabs the clipboard
the updates will not be propagated back to the guest to avoid loops, but
when some host applications updates the clipboard afterwards the changes
are sent to the guest because they come from gtk (or vnc).

Latest bits are here:
        https://git.kraxel.org/cgit/qemu/log/?h=sirius/vnc-clipboard

Feel free to try break it ;)

take care,
  Gerd




reply via email to

[Prev in Thread] Current Thread [Next in Thread]