mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-10 07:50:19 +00:00
appended lines were scheduled with a timer (REFRESH_TIMEOUT * 2 where REFRESH_TIMEOUT is 20), which effectively adds ~40ms before draw in this path. I changed that specific path to render on the next idle cycle (g_idle_add) so locally echoed sent messages appear sooner.
This commit is contained in:
@@ -5426,10 +5426,11 @@ gtk_xtext_append_entry (xtext_buffer *buf, textentry * ent, time_t stamp)
|
||||
g_source_remove (buf->xtext->io_tag);
|
||||
buf->xtext->io_tag = 0;
|
||||
}
|
||||
buf->xtext->add_io_tag = g_timeout_add (REFRESH_TIMEOUT * 2,
|
||||
(GSourceFunc)
|
||||
gtk_xtext_render_page_timeout,
|
||||
buf->xtext);
|
||||
/* Render new lines as soon as the UI is idle to avoid a noticeable
|
||||
* delay between pressing Enter and seeing your own message. */
|
||||
buf->xtext->add_io_tag = g_idle_add ((GSourceFunc)
|
||||
gtk_xtext_render_page_timeout,
|
||||
buf->xtext);
|
||||
}
|
||||
}
|
||||
if (buf->scrollbar_down)
|
||||
|
||||
Reference in New Issue
Block a user