bug-ncurses
[Top][All Lists]
Advanced

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

Re: Display problems


From: Thomas E. Dickey
Subject: Re: Display problems
Date: Wed, 23 Jan 2002 20:00:31 -0500 (EST)

On Wed, 23 Jan 2002, Ben Kohlen wrote:

> The problem only happens with a WINDOW created by
> newwin().  Not with stdscr.  Maybe (probably) it's my
> own brain-damage, so here's a demonstrative example:
>
  #include <curses.h>

> int main(void) {
>       WINDOW *w;
>       initscr();
>       cbreak();
>       noecho();
>       w = newwin();
                   ^^^missing parameters

>       wprintw(w, "foo");
>       wrefresh(w);
>       getch();
        ^^^^^ this does a refresh, overwriting the wrefresh that
              preceded, since there was a pending erase from initscr.
              Changing it to wgetch(w) would do what you intended.

>       wprintw(w, "bar");
>       wrefresh(w);
>       delwin(w);
>       endwin();
> }
>
> The above code outputs "   bar" when a key is hit.  If
> anyone can help, it would be greatly appreciated.
> I've been at this, and a similar problem, where the
> pre-getch() text shows up _until_ a key is hit, then
> disappears, for over a month now.
>
> Thanks,
> Ben
>
> __________________________________________________
> Do You Yahoo!?
> Send FREE video emails in Yahoo! Mail!
> http://promo.yahoo.com/videomail/
>
> _______________________________________________
> Bug-ncurses mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/bug-ncurses
>

-- 
T.E.Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net




reply via email to

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