]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/base/lib_getch.c
ncurses 5.7 - patch 20090117
[ncurses.git] / ncurses / base / lib_getch.c
index c7ca7aaa43084bc40c0b3d66de092381cbee9860..a3812bee76e8003cdf946bcb9aa8503fc9099e38 100644 (file)
@@ -41,7 +41,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_getch.c,v 1.97 2008/08/03 22:56:42 tom Exp $")
+MODULE_ID("$Id: lib_getch.c,v 1.99 2008/09/20 19:46:13 tom Exp $")
 
 #include <fifo_defs.h>
 
@@ -260,7 +260,7 @@ recur_wrefresh(WINDOW *win)
 {
 #ifdef USE_PTHREADS
     SCREEN *sp = _nc_screen_of(win);
-    if (sp != SP) {
+    if (_nc_use_pthreads && sp != SP) {
        SCREEN *save_SP;
 
        /* temporarily switch to the window's screen to check/refresh */
@@ -286,7 +286,7 @@ recur_wgetnstr(WINDOW *win, char *buf)
 
     if (sp != 0) {
 #ifdef USE_PTHREADS
-       if (sp != SP) {
+       if (_nc_use_pthreads && sp != SP) {
            SCREEN *save_SP;
 
            /* temporarily switch to the window's screen to get cooked input */
@@ -381,7 +381,7 @@ _nc_wgetch(WINDOW *win,
 
     recur_wrefresh(win);
 
-    if (!win->_notimeout && (win->_delay >= 0 || sp->_cbreak > 1)) {
+    if (win->_notimeout || (win->_delay >= 0) || (sp->_cbreak > 1)) {
        if (head == -1) {       /* fifo is empty */
            int delay;
            int rc;