Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #200664

ncurses problem

From Grzesiek Sójka <pld@sojka.co>
Newsgroups linux.debian.user
Subject ncurses problem
Date 2018-09-26 22:40 +0200
Message-ID <wCoLg-2Ur-11@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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.

Back to linux.debian.user | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

ncurses problem Grzesiek Sójka <pld@sojka.co> - 2018-09-26 22:40 +0200
  Re: ncurses problem Greg Wooledge <wooledg@eeg.ccf.org> - 2018-09-27 15:00 +0200
    Re: ncurses problem Sven Joachim <svenjoac@gmx.de> - 2018-09-28 11:50 +0200
      Re: ncurses problem Grzesiek Sójka <pld@sojka.co> - 2018-09-29 11:10 +0200
        Re: ncurses problem Sven Joachim <svenjoac@gmx.de> - 2018-09-29 11:20 +0200
          Re: ncurses problem Grzesiek Sójka <pld@sojka.co> - 2018-09-29 11:30 +0200

csiph-web