]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/base/lib_getch.c
ncurses 6.0 - patch 20151128
[ncurses.git] / ncurses / base / lib_getch.c
index ff2c5bdfd433b3499176e5286fbf1ba8df5d6e4d..4048fde57265dcbf3d88d07ff1b2facef2998206 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2013,2014 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2014,2015 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -42,7 +42,7 @@
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_getch.c,v 1.131 2014/05/10 20:36:57 tom Exp $")
+MODULE_ID("$Id: lib_getch.c,v 1.133 2015/11/29 01:28:52 tom Exp $")
 
 #include <fifo_defs.h>
 
@@ -426,7 +426,7 @@ _nc_wgetch(WINDOW *win,
     int ch;
     int rc = 0;
 #ifdef NCURSES_WGETCH_EVENTS
-    long event_delay = -1;
+    int event_delay = -1;
 #endif
 
     T((T_CALLED("_nc_wgetch(%p)"), (void *) win));
@@ -497,6 +497,8 @@ _nc_wgetch(WINDOW *win,
            TR(TRACE_IEVENT, ("timed delay in wgetch()"));
            if (sp->_cbreak > 1)
                delay = (sp->_cbreak - 1) * 100;
+           else if (win->_notimeout)
+               delay = 0;
            else
                delay = win->_delay;