bug-ncurses
[Top][All Lists]
Advanced

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

Re: derwin problems


From: Thomas Dickey
Subject: Re: derwin problems
Date: Sat, 11 May 2002 15:37:19 -0400
User-agent: Mutt/1.2.5i

On Sat, May 11, 2002 at 08:03:15PM +0100, Roger Gammans wrote:
> On Fri, May 10, 2002 at 10:04:19PM -0700, Scott Beck wrote:
> > 
> > Compile with:
> >     gcc -g -o curses curses.c -lncurses -DUSE_DER=1
> > 
> > to see it segv, without -DUSE_DER it works fine (atleast on my system it 
> > does).
> 
> If I apply the attached patch to libncurses it seems 
> to fix it. But this isn't the complete fix IHMO.

something like that.  Looking at what you've patched, that's something that
I overlooked, so it's still an improvement.  Thinking about it, it doesn't
seem reasonable (since the derived window shares memory with the parent)
to have the derived window's resizing cause the parent's cells to be set
to spaces.  I'll change that.

> Rationale: When a standard (nor sub/der) window is resized realloc
> is called on the line buffers. Realloc may move these block.
> 
> Later when wresize is called in a derived window, if the 
> line buffer has been realloced then it wasn't moved in the
> copy of the pointer in the derwin. The pacth forces all
> the line buffer pointers to be updated on wresize.
> 
> Unfortunaltley this means if you call wresize on a window, you
> must call it on all it's sub-windows. A better fix would be
> to update the copied pointer in the subwindows when their parent
> is resized.

actually resizterm is supposed to do that (but has limitations as noted in
the Debian bug reports).

-- 
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net



reply via email to

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