[Top][All Lists]

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

Colored background problem

From: Danny Rodriguez
Subject: Colored background problem
Date: Sat, 22 Sep 2001 13:14:06 -0400

Consider this program :
Compiler: gcc 2.95.4
Library: ncurses 5.2
#include <ncurses.h>
    WINDOW *mainWin, *subWin;
    mainWin = initscr();    // not doing error checking
    init_pair(1, COLOR_WHITE, COLOR_BLUE);
    subWin = subwin(mainWin, LINES/2, COLS, 0, 0);     // define upper half of the screen
    wbkgd(subWin, A_NORMAL | COLOR_PAIR(1) | ' ' ); // set color attributes, foreground white, background blue
    return 0;

This should make the upper part of the screen with a background of blue. When I log in locally and run this program, it does. When I SSH to my box via Putty, it doesn't.... I am not sure if this is a bug with Putty, or a bug with Ncurses.
It will display a background of blue only when you display a character other than space... Or a string with a space within it. This leads me to believe it's a problem with ncurses itself.
For example, if you display a string like "Hello World" after the werase(), the space in Hello World will in fact be a blue background.

reply via email to

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