From 04a79b4308d130b8cff40cc9e4fe48f4766e93e4 Mon Sep 17 00:00:00 2001 From: whitequark Date: Thu, 21 Apr 2016 20:23:33 +0400 Subject: [PATCH] OS X: correctly make text window the key window. This is a refactoring bug introduced in 23dc36d. --- src/cocoa/cocoamain.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cocoa/cocoamain.mm b/src/cocoa/cocoamain.mm index fa46b806..9a73372a 100644 --- a/src/cocoa/cocoamain.mm +++ b/src/cocoa/cocoamain.mm @@ -248,7 +248,6 @@ CONVERT(Rect) [editor setFrameOrigin:origin]; [editor setStringValue:text]; - [[self window] becomeKeyWindow]; [[self window] makeFirstResponder:editor]; } @@ -398,6 +397,7 @@ CONVERT(Rect) .x = xy.x + size.width / 2, .y = xy.y - size.height / 2 }; + [[self window] becomeKeyWindow]; [super startEditing:text at:[self convertPointFromBacking:point] withHeight:fontHeight usingMonospace:FALSE]; [self prepareEditorWithMinWidthInChars:minWidthChars]; @@ -966,6 +966,7 @@ SolveSpace::DialogChoice SolveSpace::LocateImportedFileYesNoCancel( - (void)startEditing:(NSString*)text at:(NSPoint)point { point = [self convertPointFromBacking:point]; point.y = -point.y + 2; + [[self window] makeKeyWindow]; [super startEditing:text at:point withHeight:15.0 usingMonospace:TRUE]; [editor setFrameSize:(NSSize){ .width = [self bounds].size.width - [editor frame].origin.x,