nanogui: nanox+flnx problem


Previous by date: 15 Jul 2002 21:43:57 -0000 Re: Starting Nano-X on /dev/fb1 problem, Dan Fandrich
Next by date: 15 Jul 2002 21:43:57 -0000 Re: Starting Nano-X on /dev/fb1 problem, svdweyer.juptech.com
Previous in thread: 15 Jul 2002 21:43:57 -0000 Re: nanox+flnx problem, Florian Berger
Next in thread: 15 Jul 2002 21:43:57 -0000 Re: nanox+flnx problem, Florian Berger

Subject: Re: [nanogui] nanox+flnx problem
From: Jordan Crouse ####@####.####
Date: 15 Jul 2002 21:43:57 -0000
Message-Id: <1026768526.17861.472.camel@cosmic>

> but actually the popup menus even pop up in the
> wrong position, when the window was previously moved. 

Yep - thats a bug all right.  The menus are created based on the x() and
y() position of the menubar / menubutton, which gives us a relative
value.  Unfortunately, the window is creating a toplevel window with
those values which will stick it relative to (0,0) on the root window. 
And to make matters worse, we try to mangle the X and Y values by
looking at the Fl::event_x_root() and Fl::event_y_root() variables which
may or may not be correctly offset for the window (I suspect that they
are not). 

The solution is to calculate the correct initial offset for the window,
and *then* find the offset of the widget, and *then* find the offset to
the relative X and Y button event.  

Lots of printf()s will be needed in and about Fl_Menu.cxx to debug this,
but I assume that the problem lies somewhere between the start of
Fl_Menu_Item::pulldown() on line 563 and the creating of the menuwindow
on line 661 or 684.  Watch the value of X and Y and see that they are
correct based on your calculations.

Jordan





Previous by date: 15 Jul 2002 21:43:57 -0000 Re: Starting Nano-X on /dev/fb1 problem, Dan Fandrich
Next by date: 15 Jul 2002 21:43:57 -0000 Re: Starting Nano-X on /dev/fb1 problem, svdweyer.juptech.com
Previous in thread: 15 Jul 2002 21:43:57 -0000 Re: nanox+flnx problem, Florian Berger
Next in thread: 15 Jul 2002 21:43:57 -0000 Re: nanox+flnx problem, Florian Berger


Powered by ezmlm-browse 0.20.