diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2023-10-06 19:02:09 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2023-10-06 19:02:09 +0200 |
| commit | f6690a974245407c5d266dcb688db694e51a3bb4 (patch) | |
| tree | 49115e000b01764a53e7ae877b704a534da9ea92 /src | |
| parent | f20e2188fdeee8be6c5ffe7f451631c4fb345601 (diff) | |
Fix: macOS runtime warning makeKeyWindow... (#785)
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_cocoa.mm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index 445f2cfb2..74eab15de 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -3062,7 +3062,8 @@ void Fl_Cocoa_Window_Driver::makeWindow() FLWindow *pxid = fl_xid(w->top_window()); [pxid makeFirstResponder:[pxid contentView]]; } else { // a top-level window - [cw makeKeyAndOrderFront:nil]; + if ([cw canBecomeKeyWindow]) [cw makeKeyAndOrderFront:nil]; + else [cw orderFront:nil]; } if (fl_sys_menu_bar && Fl_MacOS_Sys_Menu_Bar_Driver::window_menu_style() && !w->parent() && w->border() && !w->modal() && !w->non_modal()) { |
