> Good find! Setting evt in each case makes the most sense I > think. The whole > point of evt was to allow for the callback to be called > immediately after > handle() returned. In a perfect world I guess, the FLTK > main-loop would > handle the timeouts prior to handling any new events. Like > you say, this > might not be the case in Windows? If you change add_timeout() to > add_check() or add_idle() (and add the corresponding remove_check() or > remove_idle() in callback_deferred()), does that work? If > not, the only > solution I can think of is to set evt in each case block.
I think setting "evt" only for the events we want is the only way to get it to work right on WinXP - or, at the very least we must ignore the "spurious" FL_MOVE events that we get after the FL_PASTE occurs. Either using add_timeout() or add_check() works pretty much the same on WinXP here. I'm not keen on using an idle callback for this, since it maxes out the CPU whilst the confirmation dialog is displayed, which is a Bad Thing for my money. I guess if it works OK everywhere then add_check() is probably the most natural way to go. In all three cases it only works if "evt" is not allowed to be overwritten by FL_MOVE events that occur after the FL_PASTE is received, before it is processed. > I'll hold back updating the example till we know if either of > those work > better than a timeout. When I update the example, I will also include > making copies of Fl::event() and Fl::event_length() as that > is another good > suggestion too (by Greg I think). Yes - I've been using Greg's modified version of the code. The previous version does not work at all on OSX, so it needs the copy of event_text and event_length to work. -- Ian 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

