qemu-devel
[Top][All Lists]
Advanced

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

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


From: Gerd Hoffmann
Subject: Re: [PATCH 7/7] ui/gtk: add clipboard support
Date: Wed, 3 Mar 2021 13:20:14 +0100

  Hi,

> > +    if (info != gd->cbinfo[s]) {
> > +        qemu_clipboard_info_put(gd->cbinfo[s]);
> > +        gd->cbinfo[s] = qemu_clipboard_info_get(info);
> > +        gd->cbpending[s] = 0;
> > +        if (!self_update) {
> > +            if (info->types[QEMU_CLIPBOARD_TYPE_TEXT].available) {
> > +                qemu_clipboard_request(info, QEMU_CLIPBOARD_TYPE_TEXT);
> 
> Always requesting the clipboard is a bit harsh, isn't it?
> 
> +            }
> > +        }
> > +        return;
> > +    }
> > +
> > +    if (self_update) {
> > +        return;
> > +    }
> > +
> > +    if (info->types[QEMU_CLIPBOARD_TYPE_TEXT].available &&
> > +        info->types[QEMU_CLIPBOARD_TYPE_TEXT].data) {
> > +        gtk_clipboard_set_text(gd->gtkcb[s],
> > +                               info->types[QEMU_CLIPBOARD_TYPE_TEXT].data,

Well, I want gtk deal with the compatibility stuff like all the
different target names we have for text ("STRING", "text/plain", ...),
and using gtk_clipboard_set_text() seems to be the only way to do that.

I'm open to better ideas.

take care,
  Gerd




reply via email to

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