From 7a5415a3b781ae1314c769b4040a7373012fb8dd Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 9 Dec 2013 13:27:22 +0000 Subject: [PATCH] Fix IsDevToolsOpened when devtools is attched to pane on Linux. --- .../browser/linux/inspectable_web_contents_view_linux.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/brightray/browser/linux/inspectable_web_contents_view_linux.cc b/brightray/browser/linux/inspectable_web_contents_view_linux.cc index 54f54cadabe1..365a053e7709 100644 --- a/brightray/browser/linux/inspectable_web_contents_view_linux.cc +++ b/brightray/browser/linux/inspectable_web_contents_view_linux.cc @@ -167,7 +167,10 @@ void InspectableWebContentsViewLinux::CloseDevTools() { } bool InspectableWebContentsViewLinux::IsDevToolsOpened() { - return devtools_window_ && IsWidgetAncestryVisible(devtools_window_); + auto devtools_web_contents = + inspectable_web_contents()->devtools_web_contents(); + GtkWidget* devtools = devtools_web_contents->GetView()->GetNativeView(); + return IsWidgetAncestryVisible(devtools); } bool InspectableWebContentsViewLinux::SetDockSide(const std::string& side) {