mirror of
https://github.com/fltk/fltk.git
synced 2026-05-30 04:55:29 +08:00
Fix problem in native file chooser with macOS 12 "Monterey" (beta).
This commit is contained in:
@@ -627,8 +627,8 @@ int Fl_Quartz_Native_File_Chooser_Driver::runmodal()
|
|||||||
__block NSInteger complete = -1;
|
__block NSInteger complete = -1;
|
||||||
[_panel beginSheetModalForWindow:[NSApp mainWindow] completionHandler:^(NSInteger returnCode) {
|
[_panel beginSheetModalForWindow:[NSApp mainWindow] completionHandler:^(NSInteger returnCode) {
|
||||||
complete = returnCode; // this block runs after OK or Cancel was triggered in file dialog
|
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
|
}]; // 10.6 this message returns immediately and begins the file dialog as a sheet
|
||||||
while ([_panel isVisible]) Fl::wait(100); // loop until end of file dialog
|
while (complete == -1) Fl::wait(100); // loop until end of file dialog
|
||||||
retval = complete;
|
retval = complete;
|
||||||
} else {
|
} else {
|
||||||
retval = [_panel runModal];
|
retval = [_panel runModal];
|
||||||
|
|||||||
Reference in New Issue
Block a user