Hello, On Tue, Apr 01, 2008 at 03:41:29AM +0000, corvid wrote:
I wrote:
I wrote:
Does anybody remember whether the add() call was for some reason that I haven't noticed?
I don't think it is necessary as long as Group::current() is NULL (no begin() without end ()). Otherwise the popup menu would be added to Group::current() - whatever that is.
Hmm. On my various (generally quite simple) pages, it works fine with images or tables or lists or whatever. On some pages out in the wider world, though, it gets really confused. I had thought fltk was getting a mouse event and just going up the fltk widget tree to figure out x,y. That is, just Main -> UI. I guess not.
This makes my problem go away:
diff -pur dw2/dw/fltkui.cc dw2-cur/dw/fltkui.cc --- dw2/dw/fltkui.cc 2008-02-05 03:14:22.000000000 +0000 +++ dw2-cur/dw/fltkui.cc 2008-04-01 03:24:56.000000000 +0000 @@ -972,6 +972,7 @@ template <class I> void FltkSelectionRes } widgetStack->widget->set_item (pos, widgetStack->stack->size ()); } + widgetStack->stack->getTop()->getTypedValue()->end (); } }
Jeremy, does that seem all right?
Yes, that is right! I would go even further and remove all begin() calls. They are evil - at least if the matching end () is not immediately following. In your case the unmatched end () caused the popup menu to become a child of some Select-widget that happened to be on the page! I would propose the attached patch to fltkui.cc that replaces all begin () calls with direct add () calls. Then your proposed removal of the ((Group *)bw->ui)->add(pm) calls (also attached) seems to work fine. It also makes the annoying redraws when opening a popup menu go away! Thanks for your work on this, Johannes
This is yet another case of me not knowing the code at all. It sure takes a lot of code to construct a web browser...
_______________________________________________ Dillo-dev mailing list Dillo-dev@dillo.org http://lists.auriga.wearlab.de/cgi-bin/mailman/listinfo/dillo-dev