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 ...
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?
> > + 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_* ?
GDK_SELECTION* is gdk_atom_intern(*, FALSE)) afaik