diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2021-08-06 15:12:40 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2021-08-06 15:12:40 +0200 |
| commit | 33cf312a73247ce6036e94ebe06d18da436dfe7e (patch) | |
| tree | 594ddfddc799f6968551d71537b4460a653e7a3f /src/Fl_Native_File_Chooser_MAC.mm | |
| parent | db7bb6cd9854804a9733812d82559284c2b2dc43 (diff) | |
Fix problem in native file chooser with macOS 12 "Monterey" (beta).
Diffstat (limited to 'src/Fl_Native_File_Chooser_MAC.mm')
| -rw-r--r-- | src/Fl_Native_File_Chooser_MAC.mm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Fl_Native_File_Chooser_MAC.mm b/src/Fl_Native_File_Chooser_MAC.mm index 8cbd3bb52..eb09f1c40 100644 --- a/src/Fl_Native_File_Chooser_MAC.mm +++ b/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]; |
