linux: Enable force showing menubar
This is for debugging purpose.
This commit is contained in:
parent
791f988aba
commit
add9c38023
1 changed files with 5 additions and 0 deletions
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include <X11/Xatom.h>
|
||||
|
||||
#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<base::Environment> env(base::Environment::Create());
|
||||
if (env->HasVar("ELECTRON_FORCE_WINDOW_MENU_BAR"))
|
||||
return false;
|
||||
|
||||
dbus::Bus::Options options;
|
||||
scoped_refptr<dbus::Bus> bus(new dbus::Bus(options));
|
||||
|
||||
|
|
Loading…
Reference in a new issue