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: Ignacy Gawedzki
Subject: Re: Resizing properly without calling endwin()?
Date: Mon, 11 Feb 2008 03:11:19 +0100
User-agent: Mutt/1.5.15+20070412 (2007-04-11)

On Sun, Feb 10, 2008 at 08:29:45PM -0500, thus spake Thomas Dickey:
> 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).

Yes but what if, as I already mentioned, the terminal gets resized *during* a
redraw, so that ncurses' internal "idea" about how the screen looks like is
wrong?  Then the second redraw coming right after the first updates the screen
incorrectly.  In fact I'm looking for a reliable way of telling ncurses to
forget about its "idea" of the screen and start all over by clearing it (and
neither simply updating it relatively to its "idea" of the current state of it 
nor completely resetting the terminal as is apparently the case with endwin()).

-- 
Save the whales. Feed the hungry. Free the mallocs. 




reply via email to

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