From 5ae9c633ca7317c419ac0f7ba4990d0d6d386ffa Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 8 Jun 2015 13:19:56 +0800 Subject: [PATCH] Fix building on Windows, close #1896 --- atom/browser/common_web_contents_delegate.cc | 1 + atom/browser/native_window_views.cc | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/atom/browser/common_web_contents_delegate.cc b/atom/browser/common_web_contents_delegate.cc index 1cf75cf021ef..eeb8d5748edc 100644 --- a/atom/browser/common_web_contents_delegate.cc +++ b/atom/browser/common_web_contents_delegate.cc @@ -11,6 +11,7 @@ #include "atom/browser/native_window.h" #include "atom/browser/ui/file_dialog.h" #include "atom/browser/web_dialog_helper.h" +#include "base/files/file_util.h" #include "chrome/browser/ui/browser_dialogs.h" #include "content/public/browser/child_process_security_policy.h" #include "content/public/browser/render_process_host.h" diff --git a/atom/browser/native_window_views.cc b/atom/browser/native_window_views.cc index 710788ddbd11..697d0779f3f9 100644 --- a/atom/browser/native_window_views.cc +++ b/atom/browser/native_window_views.cc @@ -726,7 +726,8 @@ void NativeWindowViews::OnWidgetActivationChanged( else NotifyWindowBlur(); - if (active && GetWebContents() && !IsDevToolsOpened()) + if (active && GetWebContents() && + !inspectable_web_contents()->IsDevToolsViewShowing()) GetWebContents()->Focus(); // Hide menu bar when window is blured.