[Top][All Lists]

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

Re: Moving subwindows with NCURSES_OPAQUE

From: Bryan Christ
Subject: Re: Moving subwindows with NCURSES_OPAQUE
Date: Tue, 15 Dec 2009 11:09:33 -0600

The following code snippet you show is a workaround for a bug where
moving the parent window doesn't update the child window.  It is a know

I have the exact same "fix" in my code to handle this scenario and will
have to find a new solution as well.  I knew this day was coming and was
hoping to farther along in my project.

On Tue, 2009-12-15 at 16:57 +0000, Katarina Machalkova wrote: 
> Hi, ncurses hackers
> I'm currently experimenting with ncurses built with enabled NCURSES_OPAQUE
> and can't seem to get subwindows moved to the right positions. Following is 
> the code used for moving the subwindow:
> int begin_y, begin_x;
> WINDOW *sub;
> ...
> if ( sub && sub->parent() )
>     {
>         sub->w->_parx = -1; // force ncurses to actually move the child
>         ret = mvderwin( sub->w, begin_y, begin_x );
>       ...
>     }
> _parx is set to 'invalid' value here, since mvderwin() contains a check 
> whether the coordinates of subwindow within parent window changed, 
> and if they didn't, it evaluates is as there is nothing to do.
> I didn't write the code so I don't quite know why it is written the way it 
> is. 
> Could very well be in order to workaround a bug (discussed in this ML ~2 
> years 
> ago) where _begx and _begy of subwindows are not updated if the parent window 
> is moved to the new location.
> Now with NCURSES_OPAQUE, _parx[y] is accessible read-only, so I can no 
> longer use the above trick. So is _begx[y] and correcting subwindow 
> coordinates manually won't work either.  Anyone has a clue how to replace the 
> original functionality using opaque ncurses?
> Thanks
> fB.
> _______________________________________________
> Bug-ncurses mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/bug-ncurses

reply via email to

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