bug-ncurses
[Top][All Lists]
Advanced

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

overlapping windows will corrupt


From: Folkert van Heusden
Subject: overlapping windows will corrupt
Date: Mon, 21 Feb 2005 17:39:05 +0100
User-agent: Mutt/1.5.6+20040907i

Hi,

I created a program with 2 overlapping windows. Now if I start outputting
to both windows (and making them scroll), one of them gets corrupted.
        w1 = mynewwin(10, 20, 5, 5);
        scrollok(w1, true);
        w2 = mynewwin(10, 20, 8, 10);
        scrollok(w2, true);

        for(;;)
        {
                if (what)
                {
                        wprintw(w2, "aaaaaaaaaaaaaaaaaaa\n");
                        wprintw(w1, "1234567890123456789\n");
                }
                else
                {
                        wprintw(w2, "bbbbbbbbbbbbbbbbbbb\n");
                        wprintw(w1, "9876543210987654321\n");
                }
                what  = 1 - what;

                wnoutrefresh(w1);
                wnoutrefresh(w2);
                doupdate();

                sleep(1);
        }

(mynewwin is only subwin() with a check for null)

Now what I would expect is that w1 would be underneath w2, it is actually
the other way around but I can live with that (is there a way to lower
and upper a window?). The problem now is that the window which is on top
(w1 in this case) gets overwritten when w2 scrolls.


Folkert van Heusden

Op zoek naar een IT of Finance baan? Mail me voor de mogelijkheden!
+------------------------------------------------------------------+
|UNIX admin? Then give MultiTail (http://vanheusden.com/multitail/)|
|a try, it brings monitoring logfiles to a different level! See    |
|http://vanheusden.com/multitail/features.html for a feature list. |
+------------------------------------------= www.unixsoftware.nl =-+
Phone: +31-6-41278122, PGP-key: 1F28D8AE

Attachment: signature.asc
Description: Digital signature


reply via email to

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