From 5268f8cc53d5a47eeca518f1e3ce8bb935be71cd Mon Sep 17 00:00:00 2001 From: nathan Date: Wed, 24 Oct 2018 23:45:18 +0200 Subject: [PATCH] Fixed issue with systemtray gnome-shell restart on ubuntu 18.04 --- .../systemTray/gnomeShell/Extension.java | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/src/dorkbox/systemTray/gnomeShell/Extension.java b/src/dorkbox/systemTray/gnomeShell/Extension.java index bb00f01..72df140 100644 --- a/src/dorkbox/systemTray/gnomeShell/Extension.java +++ b/src/dorkbox/systemTray/gnomeShell/Extension.java @@ -169,16 +169,21 @@ class Extension { private static void restartShell() { + // in some situations, you can no longer restart the shell in wayland. You must logout-login for shell modifications to apply + // https://mail.gnome.org/archives/commits-list/2015-March/msg01019.html + + // HOWEVER, with wayland, shell-extensions that DO NO MODIFY THE GUI (we don't, we just add icons to it) + // are enabled without a shell restart. + + // if there are still difficulties, you can use the following + // gnome-shell-extension-tool -e SystemTray@Dorkbox + if (OSUtil.DesktopEnv.isWayland()) { - // you can no longer restart the shell in wayland. You must logout-login for shell modifications to apply - // https://mail.gnome.org/archives/commits-list/2015-March/msg01019.html - - // HOWEVER, with wayland, shell-extensions that DO NO MODIFY THE GUI (we don't, we just add icons to it) - // are enabled without a shell restart. - - // if there are still difficulties, you can use the following - // gnome-shell-extension-tool -e SystemTray@Dorkbox - return; + int[] version = OSUtil.Linux.getUbuntuVersion(); + if (version[0] == 17) { + // ubuntu 17.04 is NOT WAYLAND (it's MIR) and ubuntu 17.10 is WAYLAND (and it's broken...) + return; + } }