FLTK logo

[master] 1baa149 - macOS: simpler kludge to avoid delayed opening of the 1st window with fl_open_callback().

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

[master] 1baa149 - macOS: simpler kludge to avoid delayed opening of the 1st window with fl_open_callback(). "ManoloFLTK" 13:47 Sep 25  
 
commit 1baa1493c40d1c2e1b9f7b1520acacb0f485e55c
Author:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Fri Sep 25 15:34:41 2026 +0200
Commit:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Fri Sep 25 15:34:41 2026 +0200

    macOS: simpler kludge to avoid delayed opening of the 1st window with fl_open_callback().

 src/Fl_cocoa.mm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git src/Fl_cocoa.mm src/Fl_cocoa.mm
index b40cece..61d370a 100644
--- src/Fl_cocoa.mm
+++ src/Fl_cocoa.mm
@@ -1654,7 +1654,7 @@ static void attempt_close_all_windows() {
     fl_lock_function();
     (*open_cb)([filename UTF8String]);
     // Kludge to avoid opening of the 1st window being delayed by several seconds
-    [[NSApp keyWindow] makeKeyAndOrderFront:self];
+    [[NSApp keyWindow] orderFront:self];
     Fl::flush(); // useful for AppleScript that does not break the event loop
     fl_unlock_function();
     return YES;
[ Direct Link to Message ]
 
     
[ Previous Message ] [ Next Message ]
 
 

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