Check for set_escdelay in ncurses

This commit is contained in:
Benny Baumann 2021-07-04 16:50:41 +02:00
parent 874fb773a7
commit 18e3fd5ce7
3 changed files with 7 additions and 0 deletions

View File

@ -94,7 +94,9 @@ void InfoScreen_run(InfoScreen* this) {
if (this->inc->active) { if (this->inc->active) {
(void) move(LINES - 1, CRT_cursorX); (void) move(LINES - 1, CRT_cursorX);
} }
#ifdef HAVE_SET_ESCDELAY
set_escdelay(25); set_escdelay(25);
#endif
int ch = getch(); int ch = getch();
if (ch == ERR) { if (ch == ERR) {

View File

@ -5,6 +5,8 @@ Released under the GNU GPLv2, see the COPYING file
in the source distribution for its full text. in the source distribution for its full text.
*/ */
#include "config.h" // IWYU pragma: keep
#include "ScreenManager.h" #include "ScreenManager.h"
#include <assert.h> #include <assert.h>
@ -164,7 +166,9 @@ void ScreenManager_run(ScreenManager* this, Panel** lastFocus, int* lastKey) {
} }
int prevCh = ch; int prevCh = ch;
#ifdef HAVE_SET_ESCDELAY
set_escdelay(25); set_escdelay(25);
#endif
ch = getch(); ch = getch();
HandlerResult result = IGNORED; HandlerResult result = IGNORED;

View File

@ -336,6 +336,7 @@ if test "$my_htop_platform" = "solaris"; then
# Since ncruses macros use the ERR macro, we can not use another name. # Since ncruses macros use the ERR macro, we can not use another name.
AC_DEFINE([ERR], [(-1)], [Predefine ncurses macro.]) AC_DEFINE([ERR], [(-1)], [Predefine ncurses macro.])
fi fi
AC_CHECK_FUNCS( [set_escdelay] )
AC_ARG_ENABLE([hwloc], AC_ARG_ENABLE([hwloc],