bug-ncurses
[Top][All Lists]
Advanced

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

Re: move_panel and getbegxy


From: Bryan Christ
Subject: Re: move_panel and getbegxy
Date: Thu, 24 May 2007 09:30:56 -0500
User-agent: Thunderbird 1.5.0.10 (X11/20070302)

This is a bug which Thomas and I discussed sometime ago. You'll basically have to move the subwin yourself. A sample is below.

Thomas may have the other half of this email, I can't seem to find the follow up, but at least this will clear things up for you a bit. Basically, even though its a bug, other implementations of curses have this problem and so to fix it would break compatibility.


On Wed, 31 May 2006, Christ, Bryan wrote:

Thomas,

menu_driver() reads window->_begx and window->_begy when determining the
appropriate region/coordinates to update.  The problem with this is that
_begx and _begy don't get updated if the window is a subwin/derwin and
the parent is moved.  the outdated coords cause the mouse hit-test
processed by menu_driver() to fail.  why can't this bug be fixed so that
menu_driver calculates the offset?  currently i am hacking changes to my
subwins (and subwins of subwins of subwins...) to reflect the new data.
code snippet below:

x=0;
y=0;

subwin=child_of_window_that_was_moved;
while(subwin->_parent!=NULL)
{
  x+=subwin->_parx;
  y+=subwin->_pary;
  subwin=subwin->_parent;
}
x+=subwin->_begx;
y+=subwin->_begy;

subwin=child_of_window_that_was_moved;
subwin->_begy=y;
subwin->_begx=x;

Clive Nicolson wrote:
I am using ncurses-5.6 .

I have a panel who's window is associated with a menu (for which I provided
a subwindow via derwin).

I move the panel with move_panel and then do a getbegxy on both the window
and the menu's subwindow, the coordinate pairs returned indicate that the subwindow has not moved, but that the window has!

Is this expected?

I also note that the menu_driver can no longer select items (with the mouse)
on the moved menu!

Clive



_______________________________________________
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]