bug-ncurses
[Top][All Lists]
Advanced

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

No KEY_RESIZE if nodelay(,TRUE)...


From: John Anthony Kazos Jr.
Subject: No KEY_RESIZE if nodelay(,TRUE)...
Date: Wed, 2 Jan 2002 03:27:15 -0500 (EST)

I have written a program that does absolutely nothing but initialize
ncurses and getch() while (true), displaying the current getmaxyx() upon
receipt of KEY_RESIZE. It works perfectly with nodelay(stdscr, FALSE). It
fails with nodelay(stdscr, TRUE). It fails with nodelay(stdscr, FALSE)
with nodelay(stscr, TRUE); getch(); nodelay(stdscr, FALSE). It fails also
if I use timeout(50) or similar rather than nodelay(stdscr, TRUE).

Another problem (with nodelay(stdscr, FALSE)): some signals are getting
lost with xterm. I changed "if (CurrChar == KEY_RESIZE)" to "if (CurrChar
== KEY_RESIZE || CurrChar == 1)" (^A) after this occured, to test it. If I
resize the terminal slowly (vertically; I didn't test horizontally), it's
just fine. But if I bring it down quickly, frequently I'll end up with
several lines of text at the top from before I invoked the executable, and
the size displayed out of date. Hitting ^A properly clears the screen and
displays the size (nothing is called but getmaxyx).

What's going on with these two things? I'm trying to write a program that
uses ncurses and handles a single TCP client connection, and because using
ncurses destroys the possibility of using select(), I'm trying to 1) getch
until ERR and 2) read from the socket with a time out of 1/20 of a second,
in a loop.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]