JDK-7078460 : JDialog is shown as separate icon on the taskbar
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_10
  • CPU: x86
  • Submitted: 2011-08-12
  • Updated: 2013-12-06
  • Resolved: 2012-02-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 7 JDK 8
7u4Fixed 8 b25Fixed
Related Reports
Relates :  
Description
FULL PRODUCT VERSION :
Java 7

ADDITIONAL OS VERSION INFORMATION :
We observed this in both Windows and Solaris

A DESCRIPTION OF THE PROBLEM :
Earlier till Java6 on opening a JDialog with parent as JFrame, it used to come inside the frame.
But with Java7 it gets the icon of its own in the taskbar.  This is hindering as the taskbar is full of these icons, when the Frame has many dialogs open.

REGRESSION.  Last worked in version 6u26

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1)Launch the FileChooserDemo that comes with the JAVA installation.  (JAVA_HOME/demo/jfc/FileChooserDemo/FileChooserDemo.jar)

2) Click on the 'Show FileChooser' button to open the FileChooser Dialog.
2) Launch it with both Java6 and Java7 as well
3) We observe that in Java6 the Dialog is shown inside the 'FileChoserDemo', but in the Java7 it gets the icon for itself.



REPRODUCIBILITY :
This bug can be reproduced always.

Comments
SQE can develop manual test. But I think that this testcase exists in functional testsuite.
06-12-2013

Testcase is needed
29-11-2013

EVALUATION I took into consideration windows and now _NET_WM_STATE_SKIP_TASKBAR atom is set in XWindowPeer.
19-01-2012

EVALUATION I have relocated the code for setting _NET_WM_STATE_SKIP_TASKBAR atom to XDialog.postInit() method. It is too early to invoke it in the preInit() method.From the othe hand it is not needed to set it in setVisible() method beacuse we set owner only once at the moment of a Window creation.
19-01-2012

SUGGESTED FIX http://hg.openjdk.java.net/jdk8/awt/jdk/rev/5255fd5b0418
19-01-2012

EVALUATION Despite the fact I do not see changes that could affect setting of this property. We set the property in the next places XAtom XA_NET_WM_STATE_SKIP_TASKBAR = XAtom.get("_NET_WM_STATE_SKIP_TASKBAR"); ./classes/sun/awt/X11/XNETProtocol.javaabominog1 net_wm_state.add(protocol.XA_NET_WM_STATE_SKIP_TASKBAR); ./classes/sun/awt/X11/XWindowPeer.java "_NET_WM_STATE_SKIP_TASKBAR", True); ./native/sun/awt/splashscreen/splashscreen_sys.c Nither of them connected to the issue.
11-01-2012

EVALUATION The problem connected with _NET_WM_STATE_SKIP_TASKBAR. Before we relied on WM_TRANSIENT_FOR. We expected that this hint suggests WM do not show the window in the task bar. In jdk6 we set _NET_WM_STATE_SKIP_TASKBAR atom and it explicitly asks WM to hide the window in the taskbar. From the sources I see that we set _NET_WM_STATE_SKIP_TASKBAR atom only in WWindowPeer.setBounds(). This seems incorect. The atom should not be set every time the method is called but it should be set once when a window created. Looks like we do not invoke the setBounds method in jdk 7 and 8 for decorated windows but use overriden one from XDecoratedPeer. Anyway we should place the invocation in another place to be called for Dialogs without parrents and undecorated windows.
11-01-2012

EVALUATION I have compeared output of xprop for jdk8 and jdk6u31 it seems, that _NET_WM_STATE_SKIP_TASKBAR is not set in case of jdk8. $ diff 6u31.log 8.log 1c1,2 < XKLAVIER_STATE(INTEGER) = 0, 75497492 --- > _NET_WM_ICON_GEOMETRY(CARDINAL) = 438, 734, 203, 24 > XKLAVIER_STATE(INTEGER) = 0, 75497513 6,7c7,9 < _NET_WM_STATE(ATOM) = _NET_WM_STATE_SKIP_TASKBAR < _NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_MOVE, _NET_WM_ACTION_RESIZE, _NET_WM_ACTION_SHADE, _NET_WM_ACTION_CHANGE_DESKTOP, _NET_WM_ACTION_CLOSE, _NET_WM_ACTION_ABOVE, _NET_WM_ACTION_BELOW --- > _NET_WM_STATE(ATOM) = > _NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_MOVE, _NET_WM_ACTION_RESIZE, _NET_WM_ACTION_FULLSCREEN, _NET_WM_ACTION_SHADE, _NET_WM_ACTION_CHANGE_DESKTOP, _NET_WM_ACTION_CLOSE, _NET_WM_ACTION_ABOVE, _NET_WM_ACTION_BELOW > _NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL 9c11 < _MOTIF_DRAG_RECEIVER_INFO(_MOTIF_DRAG_RECEIVER_INFO) = 0x6c, 0x0, 0x5, 0x0, 0x14, 0x0, 0x80, 0x4, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0 --- > _MOTIF_DRAG_RECEIVER_INFO(_MOTIF_DRAG_RECEIVER_INFO) = 0x6c, 0x0, 0x5, 0x0, 0x29, 0x0, 0x80, 0x4, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0 11,15c13 < WM_NORMAL_HINTS(WM_SIZE_HINTS): < user specified location: 0, 0 < program specified location: 0, 0 < program specified size: 517 by 326 < window gravity: NorthWest --- > _NET_FRAME_EXTENTS(CARDINAL) = 1, 1, 29, 1 144d141 < _NET_FRAME_EXTENTS(CARDINAL) = 1, 1, 29, 1 149c146 < WM_PROTOCOLS(ATOM): protocols WM_DELETE_WINDOW, WM_TAKE_FOCUS --- > WM_PROTOCOLS(ATOM): protocols WM_TAKE_FOCUS, WM_DELETE_WINDOW 155a153,157 > WM_NORMAL_HINTS(WM_SIZE_HINTS): > user specified location: 0, 0 > program specified location: 0, 0 > program specified size: 517 by 326 > window gravity: NorthWest *** (#1 of 1): [ UNSAVED ] ###@###.###
10-01-2012