Fl::callback_reason() returns FL_REASON_CANCELLED if esc was pressed, and FL_REASON_CLOSED if the window manager close button was used.
You call Fl::callback_reason() from within your own window callback.
Yep. That works. Thanks!
-- Gonzalo Garramuño ggar...@gmail.com
On 22/11/23 11:18, 'Matthias Melcher' via fltk.general wrote:
You call Fl::callback_reason() from within your own window callback.
Yep. That works. Thanks!
We have a pretty small FAQ list, and subsequently it's not
referred to much,
but this item is actually on it:
https://www.fltk.org/doc-1.4/FAQ.html#faq_escape
It doesn't mention the 'reason' technique Matt showed, perhaps
that should be added.