mod/maxgui.mod/fltkmaxgui.mod/src/Fl_mac.cxx
static OSErr QuitAppleEventHandler( const AppleEvent *appleEvt, AppleEvent* reply, UInt32 refcon )
{
  fl_lock_function();

  while ( Fl_X::first ) {
    Fl_X *x = Fl_X::first;
    Fl::handle( FL_CLOSE, x->w );
    if ( Fl_X::first == x ) {
      fl_unlock_function();
      return noErr; // FLTK has not close all windows, so we return to the main program now
    }
  }

  fl_unlock_function();

  return noErr;
}
/**
 * event handler for Apple-Q key combination
 * this is also called from the Carbon Window handler after all windows were closed
 */
event handler for Apple-Q key combination
this is also called from the Carbon Window handler after all windows were closed
event handler for Apple - Q key combination this is also called from the Carbon Window handler after all windows were closed
static OSErr QuitAppleEventHandler( const AppleEvent *appleEvt, AppleEvent* reply, UInt32 refcon )
{
  fl_lock_function();
  while ( Fl_X::first ) {
    Fl_X *x = Fl_X::first;
    Fl::handle( FL_CLOSE, x->w );
    if ( Fl_X::first == x ) {
      fl_unlock_function();
      return noErr; 
    }
  }
  fl_unlock_function();
  return noErr;
}
static OSErr QuitAppleEventHandler ( const AppleEvent * appleEvt , AppleEvent * reply , UInt32 refcon ) { fl_lock_function ( ) ; while ( Fl_X :: first ) { Fl_X * x = Fl_X :: first ; Fl :: handle ( FL_CLOSE , x -> w ) ; if ( Fl_X :: first == x ) { fl_unlock_function ( ) ; return noErr ; } } fl_unlock_function ( ) ; return noErr ; }
event handler for Apple-Q key combination
 this is also called from the Carbon Window handler after all windows were closed
event handler for Apple - Q key combination this is also called from the Carbon Window handler after all windows were closed
// FLTK has not close all windows, so we return to the main program now