On 28/11/2016 16:53, Michal Suchánek wrote: >> > >> > My idea looks very much like Michal's. I hadn't gone very much beyond >> > the "you need a buffer" step, but anyway you don't need a timer---you >> > can just record a chr_accept_input callback in gd_vc_handler. It will >> > be called when the front-end is ready to get more characters. > > Where will the characters come from, though?
>From ui/gtk.c's own buffer. > This might solve the console ui hack since it has a pipe buffer it can > peek and read in pieces but the gtk ui gets a whole paste buffer in an > event callback and has to handle it whole before it returns from the > gtk event callback. Unless it stores the data that does not fit into > the serial fifo somewhere it has to drop it on the floor or block. Yes, gtk needs to have a buffer of its own (probably it should dynamically allocate it too, so that it can grow and shrink and the limit on the size can be higher). Paolo