Clicking a Fl_Choice will kick off an infinite loop with the choice
repeatedly incrementing and firing off repeated events. Instead of
incrementing from 0 to 1, it goes to 1, 2, 3, 4, 5, 6, etc.
Hmm, this sounds more like Fl_Counter rather than Fl_Choice. Correct?
FWIW: I can replicate the issue with Fl_Counter (sic!) and calling
fl_message() in the callback.
Minimal test case (counter.cxx) attached.
Note that this test program exhibits the issue on Linux (git current)
and even before commit 29d9e31c51e6c. In fact, it's also "broken" in
FLTK 1.3 (git branch-1.3 latest). I didn't bother to test on macOS (yet).
Note for testers: once you trigger the loop you can either press and
hold the "Escape" key to stop the program or you need to abort (kill)
the program otherwise.
Note also that FLTK 1.4 creates lots of individual fl_message() windows
whereas FLTK 1.3 creates only one window (that's an intended change in
FLTK 1.4).
Comments are owned by the poster. All other content is copyright 1998-2025 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.