From c720dbdb23664426fe64afaba63f6d2a1e0c34b4 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Fri, 18 Jan 2013 17:30:48 +0000 Subject: [PATCH] Mac: Call makeFirstResponder:nil from windowDidResignKey: in cefclient to remove focus from the browser view when the window becomes inactive (issue #565). git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1025 5089003a-bbd8-11dd-ad1f-f1f9622dbc98 --- cef1/tests/cefclient/cefclient_mac.mm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cef1/tests/cefclient/cefclient_mac.mm b/cef1/tests/cefclient/cefclient_mac.mm index 6ae762546..2dcb3214b 100644 --- a/cef1/tests/cefclient/cefclient_mac.mm +++ b/cef1/tests/cefclient/cefclient_mac.mm @@ -152,6 +152,10 @@ static NSAutoreleasePool* g_autopool = nil; } } +- (void)windowDidResignKey:(NSNotification*)notification { + [(NSWindow*)[notification object] makeFirstResponder:nil]; +} + // Called when the window is about to close. Perform the self-destruction // sequence by getting rid of the window. By returning YES, we allow the window // to be removed from the screen.