diff options
| author | martin <martin@NetBSD.org> | 2020-07-07 12:51:18 +0000 |
|---|---|---|
| committer | martin <martin@NetBSD.org> | 2020-07-07 12:51:18 +0000 |
| commit | d4ea4c2b49e868e6d5336de2cfea441fe393fe2e (patch) | |
| tree | 1227c3a665c7cb5219e52bfebb690d204c2f7e42 /lib | |
| parent | 185a08517f88aae9e744bd1bb66fdd8c5a1fc611 (diff) | |
Pull up following revision(s) (requested by uwe in ticket #987):
lib/libcurses/get_wch.c: revision 1.24
lib/libcurses/getch.c: revision 1.75
Pads are not to be automatically refreshed on input.
X/Open Curses says in the documentation for newpad():
Automatic refreshes of pads (e.g., from scrolling or echoing of
input) do not occur.
And in the documentation for get*():
If the current or specified window is not a pad, and it has been
moved or modified since the last refresh operation, then it will be
refreshed before another character is read.
From Michael Forney in PR lib/55457
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/libcurses/get_wch.c | 6 | ||||
| -rw-r--r-- | lib/libcurses/getch.c | 14 |
2 files changed, 10 insertions, 10 deletions
diff --git a/lib/libcurses/get_wch.c b/lib/libcurses/get_wch.c index 192eb6d92db..6cbd17423c8 100644 --- a/lib/libcurses/get_wch.c +++ b/lib/libcurses/get_wch.c @@ -1,4 +1,4 @@ -/* $NetBSD: get_wch.c,v 1.23 2019/06/09 07:40:14 blymn Exp $ */ +/* $NetBSD: get_wch.c,v 1.23.2.1 2020/07/07 12:51:18 martin Exp $ */ /* * Copyright (c) 2005 The NetBSD Foundation Inc. @@ -36,7 +36,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: get_wch.c,v 1.23 2019/06/09 07:40:14 blymn Exp $"); +__RCSID("$NetBSD: get_wch.c,v 1.23.2.1 2020/07/07 12:51:18 martin Exp $"); #endif /* not lint */ #include <errno.h> @@ -499,7 +499,7 @@ wget_wch(WINDOW *win, wint_t *ch) && __echoit) return ERR; - if (is_wintouched(win)) + if (!(win->flags & __ISPAD) && is_wintouched(win)) wrefresh(win); #ifdef DEBUG __CTRACE(__CTRACE_INPUT, "wget_wch: __echoit = %d, " diff --git a/lib/libcurses/getch.c b/lib/libcurses/getch.c index e18244ae595..8101b20d93e 100644 --- a/lib/libcurses/getch.c +++ b/lib/libcurses/getch.c @@ -1,4 +1,4 @@ -/* $NetBSD: getch.c,v 1.73 2019/06/09 07:40:14 blymn Exp $ */ +/* $NetBSD: getch.c,v 1.73.2.1 2020/07/07 12:51:18 martin Exp $ */ /* * Copyright (c) 1981, 1993, 1994 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)getch.c 8.2 (Berkeley) 5/4/94"; #else -__RCSID("$NetBSD: getch.c,v 1.73 2019/06/09 07:40:14 blymn Exp $"); +__RCSID("$NetBSD: getch.c,v 1.73.2.1 2020/07/07 12:51:18 martin Exp $"); #endif #endif /* not lint */ @@ -818,11 +818,11 @@ wgetch(WINDOW *win) && __echoit) return ERR; - if (is_wintouched(win)) - wrefresh(win); - else { - if ((_cursesi_screen->curscr->cury != (win->begy + win->cury)) - || (_cursesi_screen->curscr->curx != (win->begx + win->curx))) { + if (!(win->flags & __ISPAD)) { + if (is_wintouched(win)) + wrefresh(win); + else if ((_cursesi_screen->curscr->cury != (win->begy + win->cury)) + || (_cursesi_screen->curscr->curx != (win->begx + win->curx))) { #ifdef DEBUG __CTRACE(__CTRACE_INPUT, "wgetch: curscr cury %d cury %d curscr curx %d curx %d\n", _cursesi_screen->curscr->cury, win->begy + win->cury, |
