From e91f0bd05294fe39520bd82f438ec74cf802bb6d Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Tue, 26 Feb 2019 14:30:40 +0000 Subject: [PATCH] #2179: use appindicator on unity and gnome, but leave the other desktop environments alone for now - they're not necessarily as broken as those two git-svn-id: https://xpra.org/svn/Xpra/trunk@21894 3bb7dfac-3a0b-4e04-842a-767bc560f471 --- src/xpra/os_util.py | 3 +++ src/xpra/platform/xposix/appindicator_tray.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/xpra/os_util.py b/src/xpra/os_util.py index f773ea49de..223c9f2566 100644 --- a/src/xpra/os_util.py +++ b/src/xpra/os_util.py @@ -361,6 +361,9 @@ def getUbuntuVersion(): def is_unity(): return os.environ.get("XDG_CURRENT_DESKTOP", "").lower().startswith("unity") +def is_gnome(): + return os.environ.get("XDG_CURRENT_DESKTOP", "").lower().startswith("gnome") + def is_WSL(): if not POSIX: return False diff --git a/src/xpra/platform/xposix/appindicator_tray.py b/src/xpra/platform/xposix/appindicator_tray.py index 9954c629e9..1a46e09449 100644 --- a/src/xpra/platform/xposix/appindicator_tray.py +++ b/src/xpra/platform/xposix/appindicator_tray.py @@ -9,7 +9,7 @@ import os from xpra.util import envbool -from xpra.os_util import is_unity, monotonic_time, getUbuntuVersion, PYTHON2, PYTHON3 +from xpra.os_util import is_unity, is_gnome, monotonic_time, getUbuntuVersion, PYTHON2, PYTHON3 from xpra.client.tray_base import TrayBase from xpra.platform.paths import get_icon_dir, get_icon_filename from xpra.log import Logger @@ -51,7 +51,7 @@ def get_application_category(appindicator): return v def can_use_appindicator(): - return get_appindicator() is not None + return get_appindicator() is not None and (is_unity() or is_gnome()) class AppindicatorTray(TrayBase):