Fix: macOS runtime warning makeKeyWindow... (#785)

This commit is contained in:
ManoloFLTK 2023-10-06 19:02:09 +02:00
parent f20e2188fd
commit f6690a9742
1 changed files with 2 additions and 1 deletions

View File

@ -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()) {