NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

lib/53615: curses(3) KEY_RESIZE does not work

>Number:         53615
>Category:       lib
>Synopsis:       curses(3) KEY_RESIZE does not work
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Sep 18 12:20:00 +0000 2018
>Originator:     Kamil Rytarowski
>Release:        NetBSD 8.99.24 amd64
NetBSD rugged 8.99.24 NetBSD 8.99.24 (GENERIC) #8: Fri Aug 31 21:55:37 CEST 2018  root@chieftec:/public/netbsd-root/sys/arch/amd64/compile/GENERIC amd64
getch(3) documents:

If the terminal is resized, getch() will return KEY_RESIZE,
regardless of the setting of keypad().

However with and without keypad(3) option, getch(3) returns -1 (ERR).

The same code works well with ncurses.
#include <stdio.h>
#include <curses.h>

main(int argc, char **argv)
	int w = getch();

	printf("w=%d\n", w);

	return 0;

$ gcc -lcurses key.c
$ ./a.out
# resize terminal
# see report -1 (ERR)

Home | Main Index | Thread Index | Old Index