mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-26 09:42:25 +00:00
GTK uxsel handling: lump G_IO_HUP into G_IO_IN.
Without this, we don't receive EOF notifications on pipes, because gtk uses poll rather than select, which separates those out into distinct event types.
This commit is contained in:
parent
32a0de93bc
commit
3085e74807
@ -83,7 +83,7 @@ gboolean fd_input_func(GIOChannel *source, GIOCondition condition,
|
|||||||
*/
|
*/
|
||||||
if (condition & G_IO_PRI)
|
if (condition & G_IO_PRI)
|
||||||
select_result(sourcefd, 4);
|
select_result(sourcefd, 4);
|
||||||
if (condition & G_IO_IN)
|
if (condition & (G_IO_IN | G_IO_HUP))
|
||||||
select_result(sourcefd, 1);
|
select_result(sourcefd, 1);
|
||||||
if (condition & G_IO_OUT)
|
if (condition & G_IO_OUT)
|
||||||
select_result(sourcefd, 2);
|
select_result(sourcefd, 2);
|
||||||
@ -107,7 +107,7 @@ uxsel_id *uxsel_input_add(int fd, int rwx) {
|
|||||||
|
|
||||||
#if GTK_CHECK_VERSION(2,0,0)
|
#if GTK_CHECK_VERSION(2,0,0)
|
||||||
int flags = 0;
|
int flags = 0;
|
||||||
if (rwx & 1) flags |= G_IO_IN;
|
if (rwx & 1) flags |= G_IO_IN | G_IO_HUP;
|
||||||
if (rwx & 2) flags |= G_IO_OUT;
|
if (rwx & 2) flags |= G_IO_OUT;
|
||||||
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);
|
||||||
|
Loading…
Reference in New Issue
Block a user