diff --git a/atom/browser/native_window_views.cc b/atom/browser/native_window_views.cc index 2c0dea85db..664ab50db4 100644 --- a/atom/browser/native_window_views.cc +++ b/atom/browser/native_window_views.cc @@ -68,11 +68,10 @@ bool ShouldUseGlobalMenuBar() { // Some DE would pretend to be Unity but don't have global application menu, // so we can not trust unity::IsRunning(). // When Unity's GlobalMenu is running $UBUNTU_MENUPROXY should be set to - // something like "libappmenu.so". + // something like "libappmenu.so" (not 0 or 1) scoped_ptr env(base::Environment::Create()); std::string name; - return env && env->GetVar("UBUNTU_MENUPROXY", &name) && - !name.empty() && name != "0"; + return env && env->GetVar("UBUNTU_MENUPROXY", &name) && name.length() > 1; } #endif