File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -67,11 +67,13 @@ int kWindowsCreated = 0;
67
67
bool ShouldUseGlobalMenuBar () {
68
68
// Some DE would pretend to be Unity but don't have global application menu,
69
69
// 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)
72
70
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 ;
75
77
}
76
78
#endif
77
79
You can’t perform that action at this time.
0 commit comments