diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2024-12-15 15:59:36 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2024-12-15 16:00:06 +0100 |
| commit | c083e5c5fb7140cdbbeef1adb1e808611d46596e (patch) | |
| tree | ddfa922385043f6d57aa7411e19d86334cb57a58 /src/Fl_cocoa.mm | |
| parent | 844e58a10532194ad040048349e99e0e317aec7d (diff) | |
Fix: Crash on macOS if Escape is pressed while Help submenu is open (#1170)
Diffstat (limited to 'src/Fl_cocoa.mm')
| -rw-r--r-- | src/Fl_cocoa.mm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index 6e16ac02a..b916b3b46 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -2630,6 +2630,8 @@ static FLTextInputContext* fltextinputcontext_instance = nil; } - (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); |
