FLTK logo

[master] 33cf312 - Fix problem in native file chooser with macOS 12 "Monterey" (beta).

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] 33cf312 - Fix problem in native file chooser with macOS 12 "Monterey" (beta). "ManoloFLTK" Aug 06, 2021  
 
commit 33cf312a73247ce6036e94ebe06d18da436dfe7e
Author:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Fri Aug 6 15:12:40 2021 +0200
Commit:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Fri Aug 6 15:12:40 2021 +0200

    Fix problem in native file chooser with macOS 12 "Monterey" (beta).

 src/Fl_Native_File_Chooser_MAC.mm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git src/Fl_Native_File_Chooser_MAC.mm src/Fl_Native_File_Chooser_MAC.mm
index 8cbd3bb..eb09f1c 100644
--- src/Fl_Native_File_Chooser_MAC.mm
+++ src/Fl_Native_File_Chooser_MAC.mm
@@ -627,8 +627,8 @@ int Fl_Quartz_Native_File_Chooser_Driver::runmodal()
       __block NSInteger complete = -1;
       [_panel beginSheetModalForWindow:[NSApp mainWindow] completionHandler:^(NSInteger returnCode) {
         complete = returnCode; // this block runs after OK or Cancel was triggered in file dialog
-      }]; // this message returns immediately and begins the file dialog as a sheet
-      while ([_panel isVisible]) Fl::wait(100); // loop until end of file dialog
+      }]; // 10.6 this message returns immediately and begins the file dialog as a sheet
+      while (complete == -1) Fl::wait(100); // loop until end of file dialog
       retval = complete;
     } else {
       retval = [_panel runModal];
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'.