United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 6438179 XToolkit.isTraySupported() result has nothing to do with the system tray
6438179 : XToolkit.isTraySupported() result has nothing to do with the system tray

Details
Type:
Bug
Submit Date:
2006-06-13
Status:
Resolved
Updated Date:
2011-01-19
Project Name:
JDK
Resolved Date:
2007-09-19
Component:
client-libs
OS:
solaris_2.5.1,linux,solaris_10,solaris_nevada
Sub-Component:
java.awt
CPU:
x86,sparc,generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
6,6u2,6u7,7
Fixed Versions:
7

Related Reports
Backport:
Backport:
Duplicate:
Duplicate:
Duplicate:
Duplicate:
Relates:
Relates:

Sub Tasks

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/
                                     
2007-09-05
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.
                                     
2006-11-13
EVALUATION

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



Hardware and Software, Engineered to Work Together