|
From: | Thomas Dickey |
Subject: | Re: SIGWINCH problem |
Date: | Sun, 21 Dec 2008 20:47:52 -0500 (EST) |
On Sun, 21 Dec 2008, maxim maxim wrote:
Hi, i need your help in some issue. i'm trying to work in curses mode and i have problem with resizing (minimizing) a window of a terminal. my signal handler function is : void sig_winch(int signo) { struct winsize size; ioctl(fileno(stdout), TIOCGWINSZ, (char*)&size); resizeterm(size.ws_row, size.ws_col); flushinp(); }
There's two issues - it's not safe to put resizeterm in the signal handler.
after getting the signal SIGWINCH( when i'm minimizing the window) i see the output on the window is ok, and when i try to print with printw() or addstr() i see the half of the window is deleted. How i can to solve this problem.
resizeterm is only going to repaint the parts of the window that grew - with blanks. Perhaps that's what you are seeing.
-- Thomas E. Dickey http://invisible-island.net ftp://invisible-island.net
[Prev in Thread] | Current Thread | [Next in Thread] |