Project

General

Profile

libncurses_lib_getch_c_v6.4+20240113.patch

patch for lib_getch.c - Ovidiu Maxiniuc, 06/04/2026 05:15 PM

Download (1005 Bytes)

View differences:

ncurses-6.4+20240113/ncurses/base/lib_getch.c
375 375

  
376 376
static int kgetch(SCREEN *, bool EVENTLIST_2nd(_nc_eventlist *));
377 377

  
378
/*
379
 * This flag provides control over whether or not a refresh is invoked during
380
 * getch() processing.  If TRUE, a refresh is possible (it will only be done
381
 * if there is a change pending AND the window is not a pad). If FALSE, then
382
 * no refresh will occur, even if there are changes pending.
383
 */
384
static int getch_refresh = TRUE;
385

  
386
NCURSES_EXPORT(void)
387
auto_getch_refresh (bool refresh)
388
{
389
    T((T_CALLED("auto_getch_refresh(%d)"), refresh));
390
    getch_refresh = refresh;
391
    returnVoid;
392
}
393

  
378 394
static void
379 395
recur_wrefresh(WINDOW *win)
380 396
{
......
402 418
	_nc_unlock_global(curses);
403 419
    } else
404 420
#endif
405
	if ((is_wintouched(win) || (win->_flags & _HASMOVED))
421
	if (getch_refresh
422
	    && (is_wintouched(win) || (win->_flags & _HASMOVED))
406 423
	    && !IS_PAD(win)) {
407 424
	wrefresh(win);
408 425
    }