commit 429d71b0a885375987e0eb5779d12c7997d35e31
Author: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Fri Sep 25 11:03:36 2026 +0200
Commit: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Fri Sep 25 11:03:36 2026 +0200
macOS: add Kludge to avoid delayed opening of the 1st window with fl_open_callback() .
src/Fl_cocoa.mm | 2 ++
1 file changed, 2 insertions(+)
diff --git src/Fl_cocoa.mm src/Fl_cocoa.mm
index f0226ad..b40cece 100644
--- src/Fl_cocoa.mm
+++ src/Fl_cocoa.mm
@@ -1653,6 +1653,8 @@ static void attempt_close_all_windows() {
if (open_cb) {
fl_lock_function();
(*open_cb)([filename UTF8String]);
+ // Kludge to avoid opening of the 1st window being delayed by several seconds
+ [[NSApp keyWindow] makeKeyAndOrderFront:self];
Fl::flush(); // useful for AppleScript that does not break the event loop
fl_unlock_function();
return YES;
[ Direct Link to Message ]