Have you tried to use locking described at:
http://www.fltk.org/doc-1.3/advanced.html?

AFAIK, end_job() will access FLTK drawing facility again, which is
probably the cause why you are getting blocked UI again.

Sanel

On 01/28/2013 07:51 PM, David Lopez wrote:
> Hi everybody,
> I have a multi-thread FLTK 1.3 application on Win XP. The problem is that 
> when the application tries to print (using  Fl_Printer)  all threads get 
> blocked while the Windows printer selection dialog is open. In that case the 
> method Fl_Printer::start_job() was called from a callback (from main thread).
> So to prevent the application from blocking I decided to create a working 
> thread that calls Fl_Printer::start_job() … Fl_Printer::end_job().
> With this change, the application doesn’t block itself while the dialog is 
> open but blocks forever after printing.
> I suspect that I’m doing something wrong since I know that no window should 
> be open or close from threads other than the main one, but I don´t know what 
> would be the right way to implement this.
> Thank you very much.
> David
> 

_______________________________________________
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to