Fix "Crash on macOS if Escape then Enter is pressed while Help submenu is open" (#1431)

This commit is contained in:
ManoloFLTK
2026-05-10 08:31:23 +02:00
parent 1b83eb2a39
commit 300d3cf692
+3
View File
@@ -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);