> Manolo, since you did that particular change, I assume that you are more
> familiar with this code, and I'd like to see your comment (or a better
> solution).
>
> Here's a simple test case: use this patch to add an invisible menu item to
> the menu button in test/menubar.cxx, compile and run it, then click on the
> menu button. The application goes into an endless loop...
>
> --- test/menubar.cxx    (revision 8862)
> +++ test/menubar.cxx    (working copy)
> @@ -176,6 +176,7 @@
>    {"&Charm",   FL_ALT+'c'},
>    {"Truth",    FL_ALT+'t'},
>    {"Beauty",   FL_ALT+'b'},
> +  {0,0, 0, 0, FL_MENU_INVISIBLE},
>    {0}
>  };

I don't think it's correct to define an Fl_Menu_Item with 0 in first
field (name) and non-zero somewhere else, because 0-named items
are used everywhere in the code as markers of submenu end.
See, e.g., Fl_Menu.cxx lines 46, 316, 334.
Accepting that would require much rewriting, for a dubious benefit.
_______________________________________________
fltk-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-bugs

Reply via email to