From: Cheng Zhao Date: Sun, 4 Oct 2015 08:33:03 +0000 (+0800) Subject: linux: Enable force showing menubar X-Git-Tag: v0.33.5~7^2~1 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=add9c380230ae61316156025ef8c9fec85d23f84;p=electron.git linux: Enable force showing menubar This is for debugging purpose. --- diff --git a/atom/browser/ui/x/x_window_utils.cc b/atom/browser/ui/x/x_window_utils.cc index e5712283..f5c3f54e 100644 --- a/atom/browser/ui/x/x_window_utils.cc +++ b/atom/browser/ui/x/x_window_utils.cc @@ -6,6 +6,7 @@ #include +#include "base/environment.h" #include "base/strings/string_util.h" #include "dbus/bus.h" #include "dbus/object_proxy.h" @@ -50,6 +51,10 @@ void SetWindowType(::Window xwindow, const std::string& type) { } bool ShouldUseGlobalMenuBar() { + scoped_ptr env(base::Environment::Create()); + if (env->HasVar("ELECTRON_FORCE_WINDOW_MENU_BAR")) + return false; + dbus::Bus::Options options; scoped_refptr bus(new dbus::Bus(options));