Skip to content

Commit

Permalink
Fix: Crash on macOS if Escape is pressed while Help submenu is open (f…
Browse files Browse the repository at this point in the history
  • Loading branch information
ManoloFLTK committed Dec 15, 2024
1 parent 844e58a commit c083e5c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Fl_cocoa.mm
Original file line number Diff line number Diff line change
Expand Up @@ -2630,6 +2630,8 @@ - (void)keyDown:(NSEvent *)theEvent {
}
- (void)keyUp:(NSEvent *)theEvent {
//NSLog(@"keyUp:%@",[theEvent characters]);
if (![[theEvent window] isKindOfClass:[FLWindow class]]) // issue #1170
return [super keyUp:theEvent];
fl_lock_function();
Fl_Window *window = (Fl_Window*)[(FLWindow*)[theEvent window] getFl_Window];
Fl::first_window(window);
Expand Down

0 comments on commit c083e5c

Please sign in to comment.