United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6488834 REG: An extra icon is created on the taskbar when a native dialog is opened, Win32
JDK-6488834 : REG: An extra icon is created on the taskbar when a native dialog is opened, Win32

Details
Type:
Bug
Submit Date:
2006-11-01
Status:
Closed
Updated Date:
2011-03-07
Project Name:
JDK
Resolved Date:
2011-03-07
Component:
client-libs
OS:
windows_xp
Sub-Component:
java.awt
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:

Related Reports
Backport:
Relates:
Relates:
Relates:

Sub Tasks

Description
I am showing a frame on the screen. On Clicking a button, I am opening a FileDialog. As soon as the FileDialog is shown on the screen, I am seeing an extra icon on the taskbar for the file dialog. This is incorrect. Icons are not supposed to be created for dialogs. 

This behavior is seen for Native Print and Page Dialogs also but not seen for any of the java created dialogs. When I regressed this behavior, the icons do not appear on the taskbar for FileDialog whereas it appears for Page and Print dialogs on Tiger-FCS. On Mustang b30, icons do not appear for any of the dialogs. This seems to be the correct behavior. But since Mustang-b40, the icons have started appearing for all the dialogs mentioned above. This is reproducible on WinXP as well as Win-Vista (5840).

I have attached a sample test which will show a frame with many buttons. Clicking each of those buttons would bring up the respective dialog. Check the taskbar when the dialogs are opened.

                                    

Comments
EVALUATION

In the fix for 4080029 (AWT modality umbrella fix) all the native dialogs (file, print, page) in Java were modified to have a null native parent. This allowed AWT to control dialogs' modality more correctly, but at the same time led to the dialogs' icons to appear on the taskbar.
                                     
2006-11-01
SUGGESTED FIX

The only way to remove a window from the taskbar is to specify some parent for it. So the fix for this bug is to get a Java owner of the native dialog, get its native window and pass it as a parent for native dialog.

However, things are not so easy. If we specify some real window as a parent for the native dialogs, this would turn on the native parent modality for this dialog. This is why all the native parents were explicitly set to NULL in the fix for 4080029. The only way left is to specify some invisible window as a parent, for example, AWT toolkit window.

See http://sa.sfbay.sun.com/projects/awt_data/dolphin/6488834 for the complete code of the fix.
                                     
2006-11-07



Hardware and Software, Engineered to Work Together