DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2302
Version: 1.1.9
Fix Version: 1.1.10


Solution: flush the callback queue before popping up the message window.

Reasoning: If there are callbacks in the queue, then they would be read
and ignored anyway, thus it is no error to remove them before popping up
the window.

See attached patch file: fl_ask.diff

If nobody objects, I'll check this in tomorrow.

I don't think that we need a new RC for this. Matt, what do you think
about this?


Link: http://www.fltk.org/str.php?L2302
Version: 1.1.9
Fix Version: 1.1.10
Index: src/fl_ask.cxx
===================================================================
--- src/fl_ask.cxx      (revision 6975)
+++ src/fl_ask.cxx      (working copy)
@@ -213,6 +213,13 @@
   else
     button[0]->shortcut(FL_Escape);
 
+  // before popping up the window, we must flush the internal
+  // no-callback-queue to remove pending callback entries for
+  // widgets that have been deleted, but may have had the same
+  // addresses as one of the buttons of our window.
+
+  while (Fl::readqueue()) ;    // flush the queue
+
   message_form->show();
   // deactivate Fl::grab(), because it is incompatible with Fl::readqueue()
   Fl_Window* g = Fl::grab();
_______________________________________________
fltk-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-bugs

Reply via email to