mirror of
https://github.com/fltk/fltk.git
synced 2026-05-31 13:55:38 +08:00
Fix "Crash on macOS if Escape then Enter is pressed while Help submenu is open" (#1431)
This commit is contained in:
@@ -2445,6 +2445,9 @@ static void cocoaKeyboardHandler(NSEvent *theEvent)
|
||||
}
|
||||
- (void)keyDown:(NSEvent *)theEvent {
|
||||
//NSLog(@"keyDown:%@",[theEvent characters]);
|
||||
if (![[theEvent window] isKindOfClass:[FLWindow class]]) { // occurs with #1431
|
||||
return;
|
||||
}
|
||||
fl_lock_function();
|
||||
Fl_Window *window = [(FLWindow*)[theEvent window] getFl_Window];
|
||||
Fl::first_window(window);
|
||||
|
||||
Reference in New Issue
Block a user