JDK-8001633 : Wrong alt processing during switching between windows.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 8
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: windows
  • Submitted: 2012-10-26
  • Updated: 2015-02-10
  • Resolved: 2012-11-02
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
7u80Fixed 8 b64Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
if during long event proccessing we switch to other java window and press 'Alt' then come back to first window.( this all must be done during event proccessing ).
"Alt" will be processed as event targeted to first windows and menu of first window will be selected.

Also this can be reproduced during fast alt+tab switching, if user release alt earlier then tab.

Testcase is attached.
Comments
The issue causes the following test case to throw NPE in jdk7u-dev: (1) Compile TestFrameAltKey.java. (2) run TestFrameAltKey.class on JDK7. (3) Push "Alt" key. Then, you will see NPE on the console. import java.awt.Frame; import javax.swing.UIManager; import javax.swing.UnsupportedLookAndFeelException; public class TestFrameAltKey { public static void main(String args[]){ try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (Throwable the) { the.printStackTrace(); } Frame frame = new Frame(); frame.setSize(400,400); frame.setVisible(true); } } So, please consider back porting the fix. More details are here: JDK-8004148.
07-11-2014

Opened new bug JDK-8028271
13-11-2013

Dmitry, yes, even so little fix requires new bug, I can't commit any changes without new bug id.
12-11-2013

Is there a need to open new bug to fix the test?
11-11-2013

Verified in jdk8b115 Windows 7 x64 java version "1.8.0-ea" Java(TM) SE Runtime Environment (build 1.8.0-ea-b115) Java HotSpot(TM) 64-Bit Server VM (build 25.0-b57, mixed mode) Test test/javax/swing/plaf/windows/WindowsRootPaneUI/WrongAltProcessing/WrongAltProcessing.java fails because of incorrect mouse button click point. line 79: robot.mouseMove(point.x + (frame.getWidth() / 2), point.y + 5); Mouse clicks on hide button of each window, windows hide, test fails. If replace string with something like this: robot.mouseMove(point.x + (frame.getWidth() / 2)-50, point.y + 5); test pass successfuly; Resume: Bug fixed.
11-11-2013

Review: http://mail.openjdk.java.net/pipermail/awt-dev/2012-October/003732.html Webrev: http://cr.openjdk.java.net/%7Ealexp/8001633/webrev.02/
02-11-2012