Hi Judith, the cascading menu is popped up after a small delay triggered by a synchronous timer event. The problem is in the gSystem->ProcessEvents() called in guitest. It processes only all pending X events before returning and not any other events (socket of sync timers). Since ProcessEvents() is called after TCanvas::Update() there are always X events to process and the other event handlers are starved. A quick fix is to call twice gSystem->ProcessEvents(), to also handle the other events (all X events have been processed by the first call). I'll fix it in a more structural way in ProcessEvents() for the next release. Cheers, Fons. Judith Katzy wrote: > > hi rooters, > > I encountered a problem in the gui classes: > It seems that the cascading pop-up menus don't show up, if the process > is busy e.g. with analysing events. One example is in the guitest program > in $ROOTSYS/test. Have a look at the following: > 1. choose "Dialog" from the "Test" menu in the WinTest window. > 2. goto "Tab 3" and "start filling hists" > 3. goto "Test" menu in the WinTest window and try to activate > "Cascaded menus" > They won't show up. > If you push "stop filling hists" first, they will show up. > > In the ideal case, I would like the process to wait until > the sub-menu item has been selected and then continue with > the analysis of the event. This is the case if I select > "Message Box" in the "Test" Menu of the WinTest window. > > I would like to add a fClient->WaitFor(this) whenever the > pointer goes to the cascading menus. Since this menu item > doesn't create a message (event), that is send to the main frame, > I can't do that in my code. > > It looks to me, that the problem could be solved by adding this > line to TGPopupMenu::Activate(TGMenuEntry *entry). > > Please let me know, if there is a workaround that I didn't see. > > thanks, > Judith -- Org: CERN, European Laboratory for Particle Physics. Mail: 1211 Geneve 23, Switzerland E-Mail: Fons.Rademakers@cern.ch Phone: +41 22 7679248 WWW: http://root.cern.ch/~rdm/ Fax: +41 22 7677910
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:17 MET