bug-ncurses
[Top][All Lists]
Advanced

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

Moving subwindows with NCURSES_OPAQUE


From: Katarina Machalkova
Subject: Moving subwindows with NCURSES_OPAQUE
Date: Tue, 15 Dec 2009 17:57:52 +0100
User-agent: KMail/1.10.3 (Linux/2.6.27.39-0.2-pae; KDE/4.1.3; i686; ; )

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.




reply via email to

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