JDK-6438179 : XToolkit.isTraySupported() result has nothing to do with the system tray
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6,6u2,6u7,7
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS:
    linux,solaris_2.5.1,solaris_nevada,solaris_10 linux,solaris_2.5.1,solaris_nevada,solaris_10
  • CPU: generic,x86,sparc
  • Submitted: 2006-06-13
  • Updated: 2017-05-16
  • Resolved: 2007-09-19
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7 Other
6u10Fixed 7 b21Fixed OpenJDK6Fixed
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
[dep, 13Jun2006]

  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
    return true.

  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.

Comments
SUGGESTED FIX http://sa.sfbay.sun.com/projects/awt_data/7/6438179/
05-09-2007

EVALUATION The final fix is following. System Tray Protocol Specification is used to detect the presence of the system tray. The isSupported method of the SystemTray class returns actual state of the system tray (if the native system tray is present on the panel, then the method returns true. Otherwise, it returns false). No change in JavaDoc for the method. There is new 'systemTray' property of the SystemTray class. The property contains SystemTray instance when the system tray is available or null otherwise. The property is changed when the system tray becomes available or unavailable on the desktop.
13-11-2006

EVALUATION We need to provide presence of system tray not only for "Metacity" / "KWin".
15-06-2006