FLTK logo

[master] de4a576 - Fix for issue #145 and for unbundled macOS apps.

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] de4a576 - Fix for issue #145 and for unbundled macOS apps. "ManoloFLTK" Oct 05, 2020  
 
commit de4a5765bc4339251410d29b116fa370177b0fbe
Author:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Mon Oct 5 18:20:03 2020 +0200
Commit:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Mon Oct 5 18:20:25 2020 +0200

    Fix for issue #145 and for unbundled macOS apps.

 src/Fl_cocoa.mm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git src/Fl_cocoa.mm src/Fl_cocoa.mm
index 260525b..c7f4e41 100644
--- src/Fl_cocoa.mm
+++ src/Fl_cocoa.mm
@@ -1696,7 +1696,12 @@ void Fl_Cocoa_Screen_Driver::open_display_platform() {
         [NSApp run];
         in_nsapp_run = false;
       }
-      else [NSApp finishLaunching];
+      else {
+        [NSApp finishLaunching];
+        // Unbundled app may require this so delegate receives applicationDidFinishLaunching:
+        // even if doc states this is sent at the end of finishLaunching.
+        if (!is_bundled()) [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:nil inMode:NSDefaultRunLoopMode dequeue:NO];
+      }
     }
 
     // empty the event queue but keep system events for drag&drop of files at launch
Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.