#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>
{
#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 */
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 */
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;