Skip to content

Commit ae76657

Browse files
committedOct 17, 2014
Still requires unity for global app menubar
Fixes #709 and atom/atom#3854.
1 parent 4ca6ac3 commit ae76657

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed
 

‎atom/browser/native_window_views.cc

+6-4
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,13 @@ int kWindowsCreated = 0;
6767
bool ShouldUseGlobalMenuBar() {
6868
// Some DE would pretend to be Unity but don't have global application menu,
6969
// so we can not trust unity::IsRunning().
70-
// When Unity's GlobalMenu is running $UBUNTU_MENUPROXY should be set to
71-
// something like "libappmenu.so" (not 0 or 1)
7270
scoped_ptr<base::Environment> env(base::Environment::Create());
73-
std::string name;
74-
return env && env->GetVar("UBUNTU_MENUPROXY", &name) && name.length() > 1;
71+
bool is_unity = unity::IsRunning() &&
72+
base::nix::GetDesktopEnvironment(env.get()) ==
73+
base::nix::DESKTOP_ENVIRONMENT_UNITY;
74+
std::string menu_proxy;
75+
return is_unity && env->GetVar("UBUNTU_MENUPROXY", &menu_proxy) &&
76+
menu_proxy.length() > 1;
7577
}
7678
#endif
7779

0 commit comments

Comments
 (0)