зеркало из https://github.com/electron/electron.git
Merge pull request #708 from matttbe/globalmenu
linux: GlobalMenu: UBUNTU_MENUPROXY with >1 char
This commit is contained in:
Коммит
feb6a93881
|
@ -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<base::Environment> 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
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче