Instead of determining if the system tray is supported,
isTraySupported() derives its result from the name of the window
manager. Specifically, it returns true only if the window manager is
named "Metacity" or "KWin". Not only is there no requirement that
the window manager be the entity providing the system tray, at least
in the case of Metacity, it really doesn't. This means:
If I use Gnome (complete with panel, which supplies the system
tray) but with an alternate window manager, SystemTray.isSupported()
returns false and I can't use the system tray.
If I use Metacity in an environment where there is no system tray
(e.g. outside of Gnome), SystemTray.isSupported() will incorrectly
More generally, if I have a fully functional system tray but am not
running one of the above window managers, I can't access it.
This test should be based on the presence of a tray which follows the
System Tray Protocol Specification, not random other factors.