1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 09:58:01 +00:00

GTK3: give I/O events lower priority than window redraws.

If you run something like 'seq 2000000000' in a GTK3 pterm, the window
never actually updates, because pterm always considers reading more
data from the pty to have higher priority than delivering the "draw"
event. Using g_io_add_watch_full instead of g_io_add_watch allows us
to explicitly lower the priority of the I/O sources, so that window
redraws will take precedence.
This commit is contained in:
Simon Tatham 2016-03-20 19:44:23 +00:00
parent 36ddc57084
commit ece38fbb21

View File

@ -4053,7 +4053,8 @@ uxsel_id *uxsel_input_add(int fd, int rwx) {
if (rwx & 4) flags |= G_IO_PRI; if (rwx & 4) flags |= G_IO_PRI;
id->chan = g_io_channel_unix_new(fd); id->chan = g_io_channel_unix_new(fd);
g_io_channel_set_encoding(id->chan, NULL, NULL); g_io_channel_set_encoding(id->chan, NULL, NULL);
id->watch_id = g_io_add_watch(id->chan, flags, fd_input_func, NULL); id->watch_id = g_io_add_watch_full(id->chan, GDK_PRIORITY_REDRAW+1, flags,
fd_input_func, NULL, NULL);
#else #else
int flags = 0; int flags = 0;
if (rwx & 1) flags |= GDK_INPUT_READ; if (rwx & 1) flags |= GDK_INPUT_READ;