>
>
>
> > Mine is as you suggested, but the code doesn't come into play=20
> > because my main() function never exits because I close the=20
> > app window while main() is busy in a loop.
>
> Sorry - I don't understand what you said there... In what way is "main()
> is busy in a loop"...?
>
> And if main *really* is still stuck in a loop, why would you expect your
> application to terminate? An app only terminates once all it's threads
> (particularly main) terminate.
>
> I think you must be doing something clever that I am not understanding
> from the description... Again, a minimal example might help clarify the
> issue.

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.

>
>
> 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

Reply via email to