mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: don't check for Desktop Environment in unity_service.cc (#41211)
Don't check for Desktop Environment in unity_service.cc
This commit is contained in:
@@ -51,21 +51,10 @@ unity_launcher_entry_set_progress_visible_func entry_set_progress_visible =
|
||||
nullptr;
|
||||
|
||||
void EnsureLibUnityLoaded() {
|
||||
using base::nix::GetDesktopEnvironment;
|
||||
|
||||
if (attempted_load)
|
||||
return;
|
||||
attempted_load = true;
|
||||
|
||||
auto env = base::Environment::Create();
|
||||
base::nix::DesktopEnvironment desktop_env = GetDesktopEnvironment(env.get());
|
||||
|
||||
// The "icon-tasks" KDE task manager also honors Unity Launcher API.
|
||||
if (desktop_env != base::nix::DESKTOP_ENVIRONMENT_UNITY &&
|
||||
desktop_env != base::nix::DESKTOP_ENVIRONMENT_KDE4 &&
|
||||
desktop_env != base::nix::DESKTOP_ENVIRONMENT_KDE5)
|
||||
return;
|
||||
|
||||
// Ubuntu still hasn't given us a nice libunity.so symlink.
|
||||
void* unity_lib = dlopen("libunity.so.4", RTLD_LAZY);
|
||||
if (!unity_lib)
|
||||
|
||||
Reference in New Issue
Block a user