mirror of
https://github.com/electron/electron.git
synced 2026-02-16 18:16:39 -05:00
Merge pull request #65 from brightray/mac-devtools-focus
Focus on devtools when it is opened on Mac.
This commit is contained in:
@@ -139,7 +139,6 @@ DevToolsDelegate::DevToolsDelegate(
|
||||
}
|
||||
|
||||
DevToolsDelegate::~DevToolsDelegate() {
|
||||
LOG(ERROR) << "delete!";
|
||||
}
|
||||
|
||||
void DevToolsDelegate::Stop() {
|
||||
|
||||
@@ -49,6 +49,6 @@ class DevToolsDelegate : public content::DevToolsHttpHandlerDelegate {
|
||||
DISALLOW_COPY_AND_ASSIGN(DevToolsDelegate);
|
||||
};
|
||||
|
||||
} // namespace brightray
|
||||
} // namespace brightray
|
||||
|
||||
#endif // BRIGHTRAY_DEVTOOLS_DELEGATE_H_
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user