[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
- [PATCH v2 2/7] ui/vdagent: core infrastructure, (continued)
[PATCH v2 4/7] ui/vdagent: add clipboard support, Gerd Hoffmann, 2021/03/18
[PATCH v2 3/7] ui/vdagent: add mouse support, Gerd Hoffmann, 2021/03/18
[PATCH v2 7/7] ui/gtk: add clipboard support, Gerd Hoffmann, 2021/03/18
[PATCH v2 5/7] ui/vnc: clipboard support, Gerd Hoffmann, 2021/03/18
[PATCH v2 6/7] ui/gtk: move struct GtkDisplayState to ui/gtk.h, Gerd Hoffmann, 2021/03/18
Re: [PATCH v2 0/7] ui: add vdagent implementation and clipboard support., no-reply, 2021/03/18