summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/curses/gui-curses-main.c18
-rw-r--r--weechat/src/gui/curses/gui-curses-main.c18
2 files changed, 34 insertions, 2 deletions
diff --git a/src/gui/curses/gui-curses-main.c b/src/gui/curses/gui-curses-main.c
index 2588443b1..f0a454ab2 100644
--- a/src/gui/curses/gui-curses-main.c
+++ b/src/gui/curses/gui-curses-main.c
@@ -145,7 +145,10 @@ gui_main_loop ()
}
/* read keyboard */
-
+
+ /* on GNU/Hurd 2 select() are causing troubles with keyboard */
+ /* waiting for a fix, we use only one select() */
+#ifndef __GNU__
FD_ZERO (&read_fd);
timeout.tv_sec = 0;
timeout.tv_usec = 8000;
@@ -159,13 +162,20 @@ gui_main_loop ()
gui_keyboard_read ();
}
}
+#endif
/* read sockets (servers, child process when connecting, FIFO pipe) */
FD_ZERO (&read_fd);
+#ifdef __GNU__
+ timeout.tv_sec = 0;
+ timeout.tv_usec = 10000;
+ FD_SET (STDIN_FILENO, &read_fd);
+#else
timeout.tv_sec = 0;
timeout.tv_usec = 2000;
+#endif
if (weechat_fifo != -1)
FD_SET (weechat_fifo, &read_fd);
@@ -220,6 +230,12 @@ gui_main_loop ()
if (select (FD_SETSIZE, &read_fd, NULL, NULL, &timeout) > 0)
{
+#ifdef __GNU__
+ if (FD_ISSET (STDIN_FILENO, &read_fd))
+ {
+ gui_keyboard_read ();
+ }
+#endif
if ((weechat_fifo != -1) && (FD_ISSET (weechat_fifo, &read_fd)))
{
fifo_read ();
diff --git a/weechat/src/gui/curses/gui-curses-main.c b/weechat/src/gui/curses/gui-curses-main.c
index 2588443b1..f0a454ab2 100644
--- a/weechat/src/gui/curses/gui-curses-main.c
+++ b/weechat/src/gui/curses/gui-curses-main.c
@@ -145,7 +145,10 @@ gui_main_loop ()
}
/* read keyboard */
-
+
+ /* on GNU/Hurd 2 select() are causing troubles with keyboard */
+ /* waiting for a fix, we use only one select() */
+#ifndef __GNU__
FD_ZERO (&read_fd);
timeout.tv_sec = 0;
timeout.tv_usec = 8000;
@@ -159,13 +162,20 @@ gui_main_loop ()
gui_keyboard_read ();
}
}
+#endif
/* read sockets (servers, child process when connecting, FIFO pipe) */
FD_ZERO (&read_fd);
+#ifdef __GNU__
+ timeout.tv_sec = 0;
+ timeout.tv_usec = 10000;
+ FD_SET (STDIN_FILENO, &read_fd);
+#else
timeout.tv_sec = 0;
timeout.tv_usec = 2000;
+#endif
if (weechat_fifo != -1)
FD_SET (weechat_fifo, &read_fd);
@@ -220,6 +230,12 @@ gui_main_loop ()
if (select (FD_SETSIZE, &read_fd, NULL, NULL, &timeout) > 0)
{
+#ifdef __GNU__
+ if (FD_ISSET (STDIN_FILENO, &read_fd))
+ {
+ gui_keyboard_read ();
+ }
+#endif
if ((weechat_fifo != -1) && (FD_ISSET (weechat_fifo, &read_fd)))
{
fifo_read ();