mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Merge pull request #12885 from nornagon/is-desktop-unity
Don't declare IsDesktopEnvironmentUnity on non-Linux
This commit is contained in:
@@ -15,16 +15,14 @@
|
||||
|
||||
namespace {
|
||||
|
||||
bool IsDesktopEnvironmentUnity() {
|
||||
#if defined(OS_LINUX)
|
||||
bool IsDesktopEnvironmentUnity() {
|
||||
std::unique_ptr<base::Environment> env(base::Environment::Create());
|
||||
base::nix::DesktopEnvironment desktop_env =
|
||||
base::nix::GetDesktopEnvironment(env.get());
|
||||
return desktop_env == base::nix::DESKTOP_ENVIRONMENT_UNITY;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
Reference in New Issue
Block a user