>
> I'll not comment on all the code, but a few general pointers:
>
> - get the 1.1.8 tarball from the website, it is better than 1.1.7
> (although probably not make any immediate difference to your problems
> right now.) And trivially easy to install.=20
>
> - this is threaded code, but I don't see any occurences of the
> "volatile" keyword. I always like to see some volatiles in threaded
> code...
>
> - I reiterate *strongly* the caveats about GUI objects in any thread
> other than the main thread. Don't. In particular, any code that creates
> or destroys GUI objects *must* be in the "main" thread for correct
> operation...
>
>
>
> =20
>
> 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.
> ********************************************************************
>

Code changed so that the LiveView works.  The method ReadMappedMeory() became:
mem.SetReadPos(0);
mem.Lock();
mem.Read((unsigned char *)pixbuf, XSIZE*YSIZE);
mem.Unlock();

Fl::lock();
redraw();
Fl::unlock();
Fl::awake();

Well I have implemented your Fl::lock() and awake methods that you talked about 
earlier.  That solved the problem with the live view only being active while 
the mouse moves and all was corrected.  The view stays live in all of the tests 
I have devised so far.  So that has started working.

I'm going to make the pixbuf array a volatile reference since that is the only 
thing that is changing from loop to loop of the thread.

I am not opposed to the worker thread not calling the redraw method.  Though I 
guess I'm at a loss for how I could force it to call after updating the pixel 
buffer without making a call to it from the worker thread.

Again thanks for the help,
Ryan

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

Reply via email to