mirror of
https://github.com/fltk/fltk.git
synced 2026-05-27 02:46:34 +08:00
Fix: Crash on macOS if Escape is pressed while Help submenu is open (#1170)
This commit is contained in:
@@ -2630,6 +2630,8 @@ static FLTextInputContext* fltextinputcontext_instance = nil;
|
|||||||
}
|
}
|
||||||
- (void)keyUp:(NSEvent *)theEvent {
|
- (void)keyUp:(NSEvent *)theEvent {
|
||||||
//NSLog(@"keyUp:%@",[theEvent characters]);
|
//NSLog(@"keyUp:%@",[theEvent characters]);
|
||||||
|
if (![[theEvent window] isKindOfClass:[FLWindow class]]) // issue #1170
|
||||||
|
return [super keyUp:theEvent];
|
||||||
fl_lock_function();
|
fl_lock_function();
|
||||||
Fl_Window *window = (Fl_Window*)[(FLWindow*)[theEvent window] getFl_Window];
|
Fl_Window *window = (Fl_Window*)[(FLWindow*)[theEvent window] getFl_Window];
|
||||||
Fl::first_window(window);
|
Fl::first_window(window);
|
||||||
|
|||||||
Reference in New Issue
Block a user