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

ncurses problem



Hi there,

I compiled following test program:
==========================================
#include <ncurses.h>
#include <string.h>

int main()
{

    initscr();

    int key;
    while ((key = getch()) != 27) {
        if (key == KEY_RESIZE) {
            clear();
            mvprintw(0, 0, "COLS = %d, LINES = %d", COLS, LINES);
            for (int i = 0; i < COLS; i++)
                mvaddch(1, i, '*');
            refresh();
        }
    }

    endwin();
    return 0;
}
==========================================
It's supposed to show current window dimension when resizing terminal window. Unfortunately, dimensions are not updated and it shows initial geometry. Interesting thing is that it works perfectly after "ssh localhost" or "su -". I tested on both, sid and stretch. exactly the same result.

Any ideas??

PS. I use xfce4 and lxdm.

--
Pozdrawiam
Grzesiek

Wysłane z kompa wolnego od wirusów Billa Gatesa.


Reply to: