Merge pull request #65 from brightray/mac-devtools-focus

Focus on devtools when it is opened on Mac.
This commit is contained in:
Cheng Zhao 2014-08-07 10:51:28 +08:00
commit eab44d5045
3 changed files with 4 additions and 2 deletions

View file

@ -139,7 +139,6 @@ DevToolsDelegate::DevToolsDelegate(
}
DevToolsDelegate::~DevToolsDelegate() {
LOG(ERROR) << "delete!";
}
void DevToolsDelegate::Stop() {

View file

@ -55,6 +55,9 @@ using namespace brightray;
// sizes for them until the setContentsResizingStrategy message.
[self addSubview:devToolsView positioned:NSWindowBelow relativeTo:nil];
[self update];
// Focus on web view.
devToolsWebContents->RestoreFocus();
} else {
gfx::ScopedNSDisableScreenUpdates disabler;
devToolsWebContents->RemoveOverlayView();