From d6cb84f8a3b0626e9d674943e8e5fc3492a7d4e9 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Tue, 17 May 2016 22:39:18 +0900 Subject: [PATCH] WebContents without owner window should always open detached devtools --- atom/browser/api/atom_api_web_contents.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index 8e4653b..4cfbe60 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -866,7 +866,7 @@ void WebContents::OpenDevTools(mate::Arguments* args) { return; std::string state; - if (type_ == WEB_VIEW) { + if (type_ == WEB_VIEW || !owner_window()) { state = "detach"; } else if (args && args->Length() == 1) { bool detach = false; -- 2.7.4