All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: "Marc-André Lureau" <marcandre.lureau@gmail.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>, QEMU <qemu-devel@nongnu.org>,
	Markus Armbruster <armbru@redhat.com>
Subject: Re: [PATCH 7/7] ui/gtk: add clipboard support
Date: Wed, 3 Mar 2021 13:20:14 +0100	[thread overview]
Message-ID: <20210303122014.gmgfgz462aa5vuya@sirius.home.kraxel.org> (raw)
In-Reply-To: <CAJ+F1C+7aZyDOGB+CD2CubxzTexJ0kBkMx76Zk4zpHiQZuEx9Q@mail.gmail.com>

  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	other threads:[~2021-03-03 12:21 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-19 13:13 [PATCH 0/7] ui: add vdagent implementation and clipboard support Gerd Hoffmann
2021-02-19 13:13 ` [PATCH 1/7] ui: add clipboard infrastructure Gerd Hoffmann
2021-02-19 13:13 ` [PATCH 2/7] ui/vdagent: core infrastructure Gerd Hoffmann
2021-02-25 18:24   ` Marc-André Lureau
2021-02-19 13:13 ` [PATCH 3/7] ui/vdagent: add mouse support Gerd Hoffmann
2021-02-19 13:13 ` [PATCH 4/7] ui/vdagent: add clipboard support Gerd Hoffmann
2021-02-25 18:37   ` Marc-André Lureau
2021-02-19 13:13 ` [PATCH 5/7] ui/vnc: " Gerd Hoffmann
2021-02-25 19:09   ` Marc-André Lureau
2021-03-03 12:13     ` Gerd Hoffmann
2021-03-03 14:27       ` Marc-André Lureau
2021-03-04  8:58         ` Gerd Hoffmann
2021-03-04 10:07           ` Gerd Hoffmann
2021-02-19 13:13 ` [PATCH 6/7] ui/gtk: move struct GtkDisplayState to ui/gtk.h Gerd Hoffmann
2021-02-19 13:13 ` [PATCH 7/7] ui/gtk: add clipboard support Gerd Hoffmann
2021-02-25 19:45   ` Marc-André Lureau
2021-03-03 12:20     ` Gerd Hoffmann [this message]
2021-03-03 13:54       ` Marc-André Lureau
2021-03-04  9:04         ` Gerd Hoffmann
2021-02-19 13:36 ` [PATCH 0/7] ui: add vdagent implementation and " no-reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210303122014.gmgfgz462aa5vuya@sirius.home.kraxel.org \
    --to=kraxel@redhat.com \
    --cc=armbru@redhat.com \
    --cc=marcandre.lureau@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.