JDK-6262397 : Problem with Window Icon when minimizing SwingSet on CDE.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris
  • CPU: sparc
  • Submitted: 2005-04-27
  • Updated: 2006-04-06
  • Resolved: 2005-09-07
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
6 b51Fixed
Related Reports
Relates :  
Description
On CDE, when you minimize SwingSet, the icon says "Java" instead of
SwingSet as it does on Tiger. This happens with both XAWT and MAWT.

###@###.### 2005-04-27 19:54:55 GMT

Comments
SUGGESTED FIX *** /net/sterna/export/vb157120/mu/webrev/src/solaris/classes/sun/awt/X11/XBaseWindow.java- 2005-07-29 20:56:45.368972000 +0400 --- /net/sterna/export/vb157120/mu/webrev/src/solaris/classes/sun/awt/X11/XBaseWindow.java 2005-07-29 20:56:45.253058000 +0400 *************** *** 116,122 **** */ void postInit(XCreateWindowParams params) { if (log.isLoggable(Level.FINE)) log.fine("WM name is " + getWMName()); ! setWMName(getWMName()); // Set WM_CLIENT_LEADER property initClientLeader(); --- 116,122 ---- */ void postInit(XCreateWindowParams params) { if (log.isLoggable(Level.FINE)) log.fine("WM name is " + getWMName()); ! updateWMName(); // Set WM_CLIENT_LEADER property initClientLeader(); *************** *** 504,513 **** return mapped; } ! void setWMName(String name) { ! XAtom xa; synchronized (getAWTLock()) { ! xa = XAtom.get(XAtom.XA_WM_NAME); if (name == null) { name = " "; } --- 504,513 ---- return mapped; } ! void updateWMName() { ! String name = getWMName(); synchronized (getAWTLock()) { ! XAtom xa = XAtom.get(XAtom.XA_WM_NAME); if (name == null) { name = " "; } *** /net/sterna/export/vb157120/mu/webrev/src/solaris/classes/sun/awt/X11/XDecoratedPeer.java- 2005-07-29 20:56:45.952096000 +0400 --- /net/sterna/export/vb157120/mu/webrev/src/solaris/classes/sun/awt/X11/XDecoratedPeer.java 2005-07-29 20:56:45.847333000 +0400 *************** *** 116,124 **** target.getFont()); } public void setTitle(String title) { if (log.isLoggable(Level.FINE)) log.fine("Title is " + title); ! setWMName(title); } // NOTE: This method may be called by privileged threads. --- 116,133 ---- target.getFont()); } + protected String getWMName() { + if (winAttr.title == null || winAttr.title.trim().equals("")) { + return " "; + } else { + return winAttr.title; + } + } + public void setTitle(String title) { if (log.isLoggable(Level.FINE)) log.fine("Title is " + title); ! winAttr.title = title; ! updateWMName(); } // NOTE: This method may be called by privileged threads. *** /net/sterna/export/vb157120/mu/webrev/src/solaris/classes/sun/awt/X11/XDialogPeer.java- 2005-07-29 20:56:46.442290000 +0400 --- /net/sterna/export/vb157120/mu/webrev/src/solaris/classes/sun/awt/X11/XDialogPeer.java 2005-07-29 20:56:46.387345000 +0400 *************** *** 38,51 **** winAttr.icon = null; } - protected String getWMName() { - if (winAttr.title == null || winAttr.title.trim().equals("")) { - return " "; - } else { - return winAttr.title; - } - } - public void setVisible(boolean vis) { synchronized (XToolkit.getAWTLock()) { Dialog target = (Dialog)this.target; --- 38,43 ---- *** /net/sterna/export/vb157120/mu/webrev/src/solaris/classes/sun/awt/X11/XFramePeer.java- 2005-07-29 20:56:46.801706000 +0400 --- /net/sterna/export/vb157120/mu/webrev/src/solaris/classes/sun/awt/X11/XFramePeer.java 2005-07-29 20:56:46.734367000 +0400 *************** *** 65,71 **** setIconImage(winAttr.icon); } setupState(true); - setIconName(); } protected Insets guessInsets() { --- 65,70 ---- *************** *** 84,107 **** } } ! String getIconName() { ! return getWMName(); ! } ! ! void setIconName() { ! XAtom atom = XAtom.get(XAtom.XA_WM_ICON_NAME); ! String name = getIconName(); ! if (name == null || name.trim().equals("")) { ! name = "Java"; ! } ! atom.setProperty(getWindow(), name); ! } ! ! protected String getWMName() { ! if (winAttr.title == null || winAttr.title.trim().equals("")) { ! return " "; ! } else { ! return winAttr.title; } } --- 83,97 ---- } } ! void updateWMName() { ! super.updateWMName(); ! String name = getWMName(); ! synchronized (getAWTLock()) { ! XAtom atom = XAtom.get(XAtom.XA_WM_ICON_NAME); ! if (name == null || name.trim().equals("")) { ! name = "Java"; ! } ! atom.setProperty(getWindow(), name); } }
29-07-2005

EVALUATION By some reason WM_ICON_NAME hint of SwingSet's frame is 'Java' while WM_NAME hint is correct. On Linux hints are the same. Looks like WM_ICON_NAME is simply not used by KDE. So this is XAWT bug. Hints are set correctly when running simple test so need additional investigation. ###@###.### 2005-06-29 13:36:15 GMT
29-06-2005