Albrecht Schlosser wrote: > Add the following three lines with "***" comments to your code, and it > will work as intended. > > bool response = false; > responseWindow->user_data((void*)&response); > > Fl_Window *g = Fl::grab(); // *** non-NULL, if menu is open > if (g) Fl::grab(0); // *** release menu grab() > > // Here's where it hangs > while (responseWindow->shown()) > Fl::wait(); > > if (g) Fl::grab(g); // *** restore menu grab()
Sorry, I must add this *WARNING*: Please use this as a workaround for FLTK 1.1.9 only and test again after later upgrading. After all I'm not sure if we will find a completely different solution for FLTK 1.1.10 and FLTK 1.3 - I'm thinking of something, but I need some more investigation time. But _if_ we do, then this proposed solution _might_ crash your program or have bad effects, because the last line _might_ use a pointer to a (menu) window that has been deleted during the Fl::wait() loop. I'm sorry that this is so vague, but I really don't know more now. Albrecht _______________________________________________ fltk-bugs mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-bugs
