From: Joe Wreschnig Date: Sat, 9 Mar 2013 18:57:03 +0000 (+0100) Subject: Click when active to deactivate. X-Git-Tag: version-1.1~73 X-Git-Url: https://git.yukkurigames.com/?a=commitdiff_plain;h=20830574ccb3ed84de8e14d351f1faf74538c25b;p=enjoyable.git Click when active to deactivate. --- diff --git a/Classes/NJKeyInputField.m b/Classes/NJKeyInputField.m index ec08150..c9b2f4d 100644 --- a/Classes/NJKeyInputField.m +++ b/Classes/NJKeyInputField.m @@ -193,7 +193,9 @@ CGKeyCode NJKeyInputFieldEmpty = 0xFFFF; } - (void)mouseDown:(NSEvent *)theEvent { - if (self.acceptsFirstResponder) + if (self.window.firstResponder == self) + [self.window makeFirstResponder:nil]; + else if (self.acceptsFirstResponder) [self.window makeFirstResponder:self]; }