[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev Curses and Resize (again)
From: |
pg |
Subject: |
Re: lynx-dev Curses and Resize (again) |
Date: |
Sat, 19 Aug 2000 16:34:45 -0600 (MDT) |
In a recent note, Thomas Dickey said:
> Date: Wed, 16 Aug 2000 06:23:53 -0400
>
> On Tue, Aug 15, 2000 at 11:15:31PM -0500, Klaus Weide wrote:
> > On Tue, 15 Aug 2000, Thomas Dickey wrote:
> > > size_change() doesn't seem to be calling endwin/refresh for the standard
> > That's never been the job of size_change() (the interrupt handler itself).
> > in LYMainLoop.c. See also the comment after that point.
> ok - I had forgotten where this was done in the code. (Lynx is doing
> about all that it can do).
>
First, I must withdraw the patch. I realize I called unsafe functions in
a signal handler. (I RTFM rather than learning by experience. :-)
And it didn't work very well anyway. And I can find nothing in curses
doc about resizing windows. So I got a bigger hammer. Smash the window
entirely and install a new one. I'm playing with:
In start_curses, replace the initscr() with:
size_change(0);
putenv("LINES=...");
putenv("COLUMNS=...");
LYscreen=newterm(NULL,stdout,stdin);
and in stop_curses, replace the endwin() with:
endwin(); /* stop curses */
delscreen(LYscreen);
LYscreen = NULL;
It's charmed! It worked the first try on Solaris, and the second try on
OS/390 (needed to undo one bad conjecture). I resize the window and
immediately the screen depth adjusts correctly, but the width is still
wrong. I press ^R and the width adjusts correctly. And ^L no longer
garbles the screen (may have been a problem I introduced).
Alas, it's Not Ready for Prime time:
o I must study how it fits in the pasta potage of #ifdefs in LYCurses.c
o And I've reintroduced the multiple redraw problem that Klaus has
struggled with. Maybe I can solve it as easily as resetting
recent_sizechange. I'll work on it some more.
-- gil
--
StorageTek
INFORMATION made POWERFUL
; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden