From: "Michal Suchánek" <msuchanek@suse.de>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFC PATCH] Fix pasting into serial console in GTK ui
Date: Mon, 2 Jan 2017 16:17:40 +0100 [thread overview]
Message-ID: <20170102161740.08079f53@kitsune.suse.cz> (raw)
In-Reply-To: <81f6aacf-018f-254a-5b85-6d8d9e93adbd@redhat.com>
Hello,
On Fri, 23 Dec 2016 17:29:28 +0100
Paolo Bonzini <pbonzini@redhat.com> wrote:
> On 23/12/2016 16:12, Michal Suchanek wrote:
> > This copies the timer hack from ui/console.c kbd_send_chars to
> > ui/gtk.c gd_vc_in.
> >
> > There is no fd-like object to peek repatedly so the paste data is
> > saved in a free-floating buffer only submitted to gtk_timeout_add.
> > Multiple pastes can potentially interleave if qemu blocks for long
> > or the user pastes fast.
>
> Do not use a timer, instead set chr->chr_accept_input in
> gd_vc_handler. The callback can do basically what you are doing in
> gd_vc_in_timer. The buffer can be just a GString plus a "head"
> pointer, in VirtualConsole. Once the head catches up with the tail,
> you can free the GString.
How do you propose to use that callback? I did not find a
documentation for it. It takes no argument (except the chr object self)
so there is no way to pass in the buffer. It cannot be replaced -
it is set in non-ui code in multiple places and never in ui code.
Thanks
Michal
next prev parent reply other threads:[~2017-01-02 15:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-23 15:12 [Qemu-devel] [RFC PATCH] Fix pasting into serial console in GTK ui Michal Suchanek
2016-12-23 15:16 ` no-reply
2016-12-23 15:48 ` Michal Suchanek
2016-12-23 16:29 ` Paolo Bonzini
2017-01-02 15:17 ` Michal Suchánek [this message]
2017-01-03 13:32 ` Gerd Hoffmann
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=20170102161740.08079f53@kitsune.suse.cz \
--to=msuchanek@suse.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).