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 11:16:50 +0100

  Hi,

> > +    if (gd->cbowner[s]) {
> > +        /* ignore notifications about our own grabs */
> > +        return;
> > +    }
> > +
> > +
> > +    switch (event->owner_change.reason) {
> > +    case GDK_SETTING_ACTION_NEW:
> > +        info = qemu_clipboard_info_new(&gd->cbpeer, s);
> > +        if (gtk_clipboard_wait_is_text_available(clipboard)) {
> > +            info->types[QEMU_CLIPBOARD_TYPE_TEXT].available = true;
> > +        }
> >
> 
> Same comment as v1:
> So after gtk_clipboard_set_text() the client side is actually taking
> the ownership away from the guest clipboard I presume. That might have some
> weird interaction issues. Hopefully the other side isn't playing the same
> game...

The cbowner check above should avoid that ...

> > +    gd->gtkcb[QEMU_CLIPBOARD_SELECTION_CLIPBOARD] =
> > +        gtk_clipboard_get(gdk_atom_intern("CLIPBOARD", FALSE));
> 
> Why not use GDK_SELECTION_* ?

So I don't have to worry about converting GDK_SELECTION_* to
QEMU_CLIPBOARD_SELECTION_* ?

take care,
  Gerd




reply via email to

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