bug-ncurses
[Top][All Lists]
Advanced

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

Re: found the problem with resizing windows


From: Thomas Dickey
Subject: Re: found the problem with resizing windows
Date: Thu, 22 Jul 2004 14:48:35 -0400 (EDT)

On Thu, 22 Jul 2004, Folkert van Heusden wrote:

> Hmmm, newwin() is not an option as it seems to clear the whole terminal.

newwin() shouldn't have to clear the terminal
(that comment sounds familiar).

for the rest - I'll have to look into what's not being done properly
for derwin().

> Anyone a suggestion for resolving this problem?
>
> On Thu, 22 Jul 2004, Folkert van Heusden wrote:
>
> > Date: Thu, 22 Jul 2004 20:12:23 +0200 (CEST)
> > From: Folkert van Heusden <address@hidden>
> > To: address@hidden
> > Subject: found the problem with resizing windows
> >
> > At last!
> > I found the problem with resizing sometimes failing!
> > I always used subwin(stdscr, ...) for creating windows and it seems that
> > when resizing very quick the internal variables are not always updated
> > correctly. I added extensive logging to ncurses and found that:
> >
> > derwin: too large, max_y/x: 33x91, actual: 36x91
> >
> > this means: the caller tries to create a window of 36x91 while the stdscr is
> > still known to be 33x91.
> >
> > NCURSES_EXPORT(WINDOW *)
> > derwin(WINDOW *orig, int num_lines, int num_columns, int begy, int begx)
> > ...
> >     /*
> >      * make sure window fits inside the original one
> >      */
> >     if (begy < 0 || begx < 0 || orig == 0 || num_lines < 0 || num_columns <
> > 0)
> >     {
> >         syslog(LOG_ERR, "derwin: coords/sizes out of bounds: %dx%d, %dx%d,
> > orig: %p", num_lines, num_columns, begy, begx, orig
> > );
> >         returnWin(0);
> >     }
> >     if (begy + num_lines > orig->_maxy + 1
> >         || begx + num_columns > orig->_maxx + 1)
> >     {
> >         syslog(LOG_ERR, "derwin: too large, max_y/x: %dx%d, actual: %dx%d",
> > orig->_maxy + 1, orig->_maxx + 1, begy + num_lines
> > , begx + num_columns);
> >         returnWin(0);
> >     }
> > ...
> >
> > Not sure if it is a bug but my solution is now that I use newwin(...).
> >
> >
> > Folkert van Heusden
> >
> > +------------------------------------------------------------------+
> > |UNIX admin? Then give MultiTail (http://vanheusden.com/multitail/)|
> > |a try, it brings monitoring logfiles to a different level! See    |
> > |http://vanheusden.com/multitail/features.html for a feature list. |
> > +------------------------------------------= www.unixsoftware.nl =-+
> >
> >
> >
> > _______________________________________________
> > Bug-ncurses mailing list
> > address@hidden
> > http://lists.gnu.org/mailman/listinfo/bug-ncurses
> >
>
>
>
> Folkert van Heusden
>
> +------------------------------------------------------------------+
> |UNIX admin? Then give MultiTail (http://vanheusden.com/multitail/)|
> |a try, it brings monitoring logfiles to a different level! See    |
> |http://vanheusden.com/multitail/features.html for a feature list. |
> +------------------------------------------= www.unixsoftware.nl =-+
>
>
>
> _______________________________________________
> Bug-ncurses mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/bug-ncurses
>

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net




reply via email to

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