bug-ncurses
[Top][All Lists]
Advanced

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

Re: Resizing properly without calling endwin()?


From: Thomas Dickey
Subject: Re: Resizing properly without calling endwin()?
Date: Sun, 10 Feb 2008 20:29:45 -0500 (EST)

On Sat, 9 Feb 2008, Ignacy Gawedzki wrote:

So my question is the following: how can I tell ncurses that its internal
buffer representing the physical screen is not reliable anymore and that it
has to erase the whole screen and start drawing again from scratch, just as it
does in the initial call to clear() but *without* restoring the previous state
(so as to avoid showing the previous screen content) as it is done by a call
to endwin() and refresh()?

What seems to work is to have the signal handler set a flag that the application checks - and to ensure that it checks the flag at the end of updating the screen (clear the flag before starting the update, keep updating as long as the flag's still set).

ncurses does this implicitly by checking the flag each time it goes into wgetch, and pushing another KEY_RESIZE.

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net




reply via email to

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