bug-ncurses
[Top][All Lists]
Advanced

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

Re: flashing screen symptoms (an example)


From: Neil Zanella
Subject: Re: flashing screen symptoms (an example)
Date: Sat, 4 Nov 2000 01:22:07 -0330 (NST)

Hello,

Finally I figured out what was causing those flashes. I had a call to
wclear() on a subwindow instead of a call of werase(). The wclear()
was causing the entire screen to be repainted. So that was a very
silly mistake which I should have spotted!!!

Other than that I don't believe that the following statement is true
(and I think I've said this already). I think that one can very well
have stdscr partitioned into {w_i} and each w_i into {w_ij} and each
w_ij into {w_ijk} etc... In this case when an operation is perormed
on the parent then touchwin() must be called on the child if the child
is to be refreshed. Conversely if operations (e.g. adding text or
changing attributes) are performed on the child then one must call
touchwin() on the parent before refreshing the parent. On the other
hand if the window W to be refreshed is the same as the window on which
all operations are being performed since the last wrefresh() then
it is OK NOT to call touchwin() on any window before refreshing W.
This explanation is rather lengthy but I think it answers many of the
subwindow issues. And if someone thinks the above is wrong then please
speak up and show me with a counterexample why it is wrong. Otherwise
we need to update the man pages a little bit.

I think I will also be submitting a subwindow test program to confirm
the above.

Thanks,

Neil

On Fri, 3 Nov 2000, Brian Raiter wrote:

> > But whenever a subwindow is created it overlaps with stdscr so what
> > exactly is the meaning of a nonoverlapping window?
> 
> >From the ncurses man page:
> 
>        Note that curses  does  not  handle  overlapping  windows,
>        that's  done by the panel(3X) library. This means that you
>        can either use stdscr or divide the screen into tiled win-
>        dows  and  not  using  stdscr  at all. Mixing the two will
>        result in unpredictable, and undesired, effects.
> 
> In other words, you *can* have two windows that overlap (such as
> stdscr and a subwindow), as long as you only draw on, and refresh, one
> of them.
> 
> For my part, I've generally found it simpler to just use stdscr and
> calculate the coordinates of subregions in the code, or to go all the
> way and use panels. Using tiled subwindows usually makes for more
> complicated code in the end.
> 
> b
> 




reply via email to

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