diff --git a/src/dorkbox/systemTray/jna/linux/AppIndicator.java b/src/dorkbox/systemTray/jna/linux/AppIndicator.java index ab43558..6cc2d8a 100644 --- a/src/dorkbox/systemTray/jna/linux/AppIndicator.java +++ b/src/dorkbox/systemTray/jna/linux/AppIndicator.java @@ -48,7 +48,8 @@ class AppIndicator { boolean _isVersion3 = false; boolean _isLoaded = false; - if (!OS.isLinux()) { + boolean shouldLoadAppIndicator = !(OS.isWindows() || OS.isMacOsX()); + if (!shouldLoadAppIndicator) { _isLoaded = true; } @@ -230,7 +231,7 @@ class AppIndicator { } } - if (OS.isLinux()) { + if (shouldLoadAppIndicator) { isLoaded = _isLoaded; isVersion3 = _isVersion3; } else { diff --git a/src/dorkbox/systemTray/jna/linux/Gtk.java b/src/dorkbox/systemTray/jna/linux/Gtk.java index c9c55d4..0223e8b 100644 --- a/src/dorkbox/systemTray/jna/linux/Gtk.java +++ b/src/dorkbox/systemTray/jna/linux/Gtk.java @@ -84,7 +84,8 @@ class Gtk { boolean _isLoaded = false; boolean _alreadyRunningGTK = false; - if (!OS.isLinux()) { + boolean shouldLoadGtk = !(OS.isWindows() || OS.isMacOsX()); + if (!shouldLoadGtk) { _isLoaded = true; } @@ -186,7 +187,7 @@ class Gtk { isGtk3 = false; } - if (OS.isLinux() && !_isLoaded) { + if (shouldLoadGtk && !_isLoaded) { throw new RuntimeException("We apologize for this, but we are unable to determine the GTK library is in use, " + "or even if it is in use... Please create an issue for this and include your OS type and configuration."); }