> the creating and destroying is not too much of a problem and 
> I would be willing to jump through quite some hoops to create 
> them in whatever way works. My primary issue seems to be the 
> mainloop . In my case I cannot start the mainloop in the main 
> thread (which potentially already runs the mainloop of 
> another gui for example). So I tried creating all my windows 
> in the main thread but letting the mainloop run in it's own 
> child thread. However, this seems to mess with the event 
> system and the window never gets the focus.

You don't necessarily have to call fltk's run loop at all - fltk will
work pretty well, as long as you can arrange to pump it by calling
Fl::check() on a fairly frequent basis from your existing run loop. But
calling Fl::run() form the child thread... Nope, that will not work
(locking issues etc...)
So, if you can modify the run loop in your main thread to call
Fl::check() there's a good chance things will "Just Work".







SELEX Sensors and Airborne Systems Limited
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 
3EL
A company registered in England & Wales.  Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to