JDK-6996708 : The event on the tray icon does not trigger and there is no message printed.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7,7u6
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: os_x,windows_xp
  • CPU: x86
  • Submitted: 2010-11-02
  • Updated: 2012-06-14
  • Resolved: 2011-04-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
7 b134Fixed
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Description
Bug description:When Double-click with left button on the tray icon ,the event does not trigger and there is no message printed below.
Testsuite name: AWT Regression
JDK/JRE tested: jdk-7-ea-bin-b116-windows-amd64-28_oct_2010.exe
OS/architecture: winxp-x64
Reproducible: Always
Reproducible on machine: 
[If sometimes] Also reproducible on machine: 
Is it a platform specific regression: N 
[If yes] Is it a new platform support: N 
[If yes] Regression relative to OS version: 
Is it a Regression: Y
[If yes] Regression introduced in release/build: 1.7.0b115
[If yes] Test result on FCS: See the actual result. 

Test run log location: http://jsqalab.sfbay.sun.com/results/Evergreen/7/1.7.0b116/awt/winxp-x64/work/closed/java/awt/TrayIcon/DisposeInActionEventTest/DisposeInActionEventTest.jtr

Test run result location: http://jsqalab.sfbay.sun.com/results/Evergreen/7/1.7.0b116/awt/winxp-x64/work/closed/java/awt/TrayIcon/DisposeInActionEventTest/

Steps to reproduce:
1.	Install test bundle JDK1.7.0b116 from
http://jre.sfbay/java/re/jdk/7/promoted/ea/b116/bundles
to  C:/java
2.	Install Jtreg from http://jre.sfbay.sun.com/java/re/jtreg/4.1/promoted/latest/binaries/latest/jtreg/
 locate at C:/awt/reg/jct4.1
3.	Download and unzip jdk1.7.0b116 ws from http://hg.openjdk.java.net/jdk7/awt/jdk
to C:/reg
4.	Modify the reg_awt.sh as:
export JAVA_HOME=C:/java/jdk1.7.0
C:/awt/reg/jtreg-4.1-bin-b02_21_may_2010/jtreg/linux/bin/jtreg -g -v -m -jdk:C:/java/jdk1.7.0 -r:C:/awt/reg/report -w:C:/awt/reg/work C:/awt/reg/7_awt_reg/test
5.	Make printer work fine. 
6.	From command line, run sh reg_awt.sh
7.	After Jtreg launched, choose Current Configuration from View Filter:Status of ,  
8.	Choose  New Configuration from Configure of menu bar.
9.	Choose Yes form Specify Test to Run ,click Next button then choose From a List a File,click next button and click Browse button to choose C:/awt/reg/6u23-j2se-reg/awt.list.
10.	Click next button and select the default option.
11.	Choose Yes button from Specify Keyword? then click next button and type manual on the textfield of Response and click Done button to save a *jti file.
12.	Click StartRunning Test  button to run the case.

Case description:
When the test starts, it adds the icon to the tray aread. If you don't see a tray icon, please, make sure that the tray area(also called Taskbar Status Area on MS Windows, Notification Area on Gnome or System Tray on KDE) is visible.Double-click with left button on the tray icon to trigger the action event. Brief information about action events is printed below. After each action event the tray icon is removed from the tray and then added back in a second.The test performs some automatic checks when removing the icon. If something is wrong the corresponding message is displayed below. Repeat double-clicks several times. If no 'Test FAILED' messages  are printed, press PASS button else FAIL button.

Actual behavior:
When Double-click with left button on the tray icon ,the event does not trigger and there is no message printed below.

Verify:
on the same platform with the bulid jdk1.7.0b115 has the same issue.

Comments
SUGGESTED FIX src/windows/native/sun/windows/awt_TrayIcon.cpp *** 198,211 **** switch (shellVersion) { case 5: // WIN_2000 m_nid.cbSize = (BYTE *)(&m_nid.guidItem) - (BYTE *)(&m_nid.cbSize); break; case 6: // WIN_XP ! // Uncomment these two lines when moving to VS2008 ! // m_nid.cbSize = (BYTE *)(&m_nid.hBalloonIcon) - (BYTE *)(&m_nid.cbSize); ! // break; ! default: // WIN_VISTA? m_nid.cbSize = sizeof(m_nid); break; } m_nid.hWnd = AwtTrayIcon::sm_msgWindow; m_nid.uID = uID; --- 198,210 ---- switch (shellVersion) { case 5: // WIN_2000 m_nid.cbSize = (BYTE *)(&m_nid.guidItem) - (BYTE *)(&m_nid.cbSize); break; case 6: // WIN_XP ! m_nid.cbSize = (BYTE *)(&m_nid.hBalloonIcon) - (BYTE *)(&m_nid.cbSize); ! break; ! default: // WIN_VISTA m_nid.cbSize = sizeof(m_nid); break; } m_nid.hWnd = AwtTrayIcon::sm_msgWindow; m_nid.uID = uID;
21-02-2011

EVALUATION Regression of transition from VS2003 to VS2010.
21-02-2011

EVALUATION Seems like it's introduced in b108. Strange thing is that there's no any changes from AWT integrated in this build.
15-02-2011

EVALUATION The problem is reproducible on Win XP.
11-02-2011