John Hoare wrote:
> I am the author of a simple robot control software library. Under normal
> operation, a graphical window will only show up if users request to display
> an image taken by the robot's camera.
>
> Right now, I have the drawing being handled by a separate thread, which does
> all the FLTK calls. This thread is constantly calling Fl::wait().
>
> However, although this seems to work fine on Linux and OS X, it does not seem
> to work at all on windows (under cygwin).
Well, after I showed you a simple example in my other posting,
I read again that you used threads (and how you did it).
As you noted, this doesn't work on Windows. You should read
the chapter about multithreading in the FLTK docs. To make
it short:
- do all FLTK operations that interact with the event handling
(Fl::wait()) and especially those that create/show/hide windows,
only from one (typically the main) thread.
- use Fl::lock() and Fl::unlock() for all other FLTK calls within
other than the main thread.
Others can tell you more about this, but I HTH.
Albrecht
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk