JDK-8213983 : [macosx] Keyboard shortcut “cmd +`” stops working properly if popup window is displayed
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 8,8u202,11.0.2,12
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: os_x
  • Submitted: 2018-11-16
  • Updated: 2021-10-16
  • Resolved: 2018-12-06
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 11 JDK 12 JDK 8 Other
11.0.3-oracleFixed 12 b24Fixed 8u211Fixed openjdk8u212Fixed
Related Reports
Duplicate :  
Relates :  
Description
For the issue of 'Cycling through windows (JFrames) does not work with keyboard shortcut' on macosx, the fix provided by JDK-8212007, JDK-8212180 as a backport on 8u202 and 11.0.2 is only partially working. 

Attached is a test which opens up Multiple JFrames with a combobox in it. 
Execute the test with the build with the fix 
1) Press CMD + ` keys multiple times. Toggling of active frame between 3,2,1 occurs as expected. 
This is the expected fix and the behaviour should be seen consistently always. 

2) Now with Frame 3 being active click on Frame 2 to make it active. 
Repeat step1. 
Expected : Toggling of active frame between 3,2,1 
Actual: Toggling of active frame between 3 and 2 only. 

Now, try the same by randomly selecting any one frame and then pressing CMD +` key the cycling ceases to happen across all the 3 frames. 
Comments
Ugh, sorry. I accidentally pushed this to 8u believing it had been approved for 8u already. Here is the retro-active fix request for JDK 8u: Fix Request for 8u: The patch applies as is to 8u (post unshuffeling). Builds fine on mac os X[1] and Aleksey verified the reproducer works post-patch. [1] https://ci.adoptopenjdk.net/job/jdk8u-mac-x64-hotspot-severin/
13-03-2019

I'll look at this one for an 8u backport.
11-03-2019

Fix Request This fix resolves the problem and partially reverts JDK-8206392 from 11u. (I see it is in 11.0.3-oracle). Patch applies cleanly to 11u, builds fine on Linux and Mac OS X, and manual reproducer works on Mac OS X fine.
20-02-2019

URL: http://hg.openjdk.java.net/jdk/jdk/rev/5adeed0d6311 User: psadhukhan Date: 2018-12-12 09:35:32 +0000
12-12-2018

URL: http://hg.openjdk.java.net/jdk/client/rev/5adeed0d6311 User: dmarkov Date: 2018-12-06 13:33:08 +0000
06-12-2018

Problem description: The issue is caused by orderFront operation when it is called for the focused window, (i.e. window which is already located above other windows). In other words double invocation of order operation for the same window will break the cycling shortcut. Fix: - Add check to suppress ordering if the window is already active, (i.e. owns focus) - Back out the changes made under JDK-8206392 since they are not necessary anymore
06-12-2018

This problem is related to popup windows. If [cmd + `] combination is used and a popup window is displayed the cycling through the windows gets broken. I think we can exclude windows which own popup from the ordering operation. That should resolve the issue. Also we use another window level to display popups so they are always placed above their parents, (i.e. ordering is not really necessary for popup windows).
20-11-2018

[~smandalika] as a bug submitter, please write the bug Description, this is empty
19-11-2018

Issue is reproduced with JDK 12 internal build on Mac OS 10.13.6. Issue is tried with and found to be reproducible with multiple frames containing JCombo box, JPopupMenu with one or more items, JButton with tooltip. Problem starts appearing when the user clicks on the JComboxBox item or the Menu item in JPopupMenu, otherwise if the user simply keep toggling using CMD + `, problem is not seen.
19-11-2018

[~smandalika] Can you attach the test, you mentioned in the bugs description? I tried to reproduce the problem using your steps and the test from JDK-8207390, which is dupe of JDK-8206392, but without success so far.
16-11-2018

[~smandalika] In the title of this bug, I think you meant JDK-8212007 is the partial fix not JDK-8212147. I don't think current bug has anything to do with the JDK-8212147. I have changed the bug title to reflect this. Please correct me if I am wrong and you actually meant JDK-8212147
16-11-2018