Ronnie Ward wrote:
> Well, think of the code structured at follows:
> int main()
> {
> //set up and show FLTK window
>
> while(true) {
>
> //user interacts with stuff in the window
> }
> }
>
> The user can exit the code using an exit button, whose callback contains an
> exit(0),
> or the user can close the window using the X in the upper right corner.
> The problem occurs in the latter case. I'd like to just catch the close (X)
> and exit(0), but setting a callback on the main window doesn't do the trick.
Hmm, so you say the exit button callback is working when it calls
exit(0)
but setting a callback for the window to call exit(0) isn't working?
This sounds odd -- as in either case calling exit(0) should behave the
same, whether it's a window callback or not.
Can we see the code where you define the window and set the callback,
and all the callback code?
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk