Alvin wrote: > Alvin wrote: > >> Short of not popping up another window on a FL_PASTE (via DND), what can >> I do? > > I figured out a workaround/solution. When the DND FL_PASTE occurs, I add a > timeout of 0.0 that does all the work of calling fl_choice() and others. > This way FL_PASTE can return 1 before any other event can occur. > > I have currently implemented: > case FL_PASTE: > Fl::add_timeout(0.0f, Fl_DND_Box::paste_hook, (void*)this); > return 1; > > So far, on my machine, using a timeout of 0 works and konqueror no longer > locks up or crashes. Should I use something like 0.5 to account for slower > computers? > > Thanks. >
Sorry to answer myself again, but I "used the source" and from what I can tell, Fl::add_timeout() simply inserts the timeout and doesn't execute it (yet). So, using 0.0 is ok since the Fl::run() will not process the timeout till it finishes processing the FL_PASTE event. Is this correct? I would like to write an article with example concerning DND in fltk. I would like to cover DND receiving first since I think its the easiest of the two (the other being DND sending) initially understand. I would include my Fl_DND_Box widget. Would this be useful or should I not bother? Thanks. -- Alvin _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

