United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6533175 Pressing F10 when a modal dialog is visible hangs the Xserver, XToolkit
JDK-6533175 : Pressing F10 when a modal dialog is visible hangs the Xserver, XToolkit

Details
Type:
Bug
Submit Date:
2007-03-10
Status:
Closed
Updated Date:
2011-03-07
Project Name:
JDK
Resolved Date:
2011-03-07
Component:
client-libs
OS:
solaris_2.5.1,solaris_10
Sub-Component:
java.awt
CPU:
x86,sparc
Priority:
P2
Resolution:
Fixed
Affected Versions:
6,6u10
Fixed Versions:

Related Reports
Backport:
Duplicate:
Relates:

Sub Tasks

Description
I have a frame with a menu added to the menubar. On clicking a button on the frame, I am opening a file dialog. When the file dialog is visible, I am pressing 'F10'. This has been dispatched to the frame and the menu comes up. But Xserver hangs after that and I have to kill the java process from another machine. It is incorrect that frame's menu responds to F10 when a modal dialog is visible. 

This is reproducible on SolSparc10-JDS as well as SuSE10 with JDK6 as well as JDK7-b09. I tried regressing this failure and found that the menu always responds to F10 on JDK5 but the Xserver started hanging only after JDK6-b40. Xserver behaves normally on b30. Lot of fixes have gone into b39 and b40 of JDK6. 

I have attached a sample test. Execute it and press the button. A file dialog would come up. Once the file dialog comes, press F10. Xserver will stop responding to user interactions.

                                    

Comments
EVALUATION

The problem seems to be in the grab + modality. When a modal dialog is shown, we expect no blocked windows to receive focus and key events. However, F10 is handles separately, so it is retargeted from the dialog to its parent frame and a menu is shown. After this menu can't hidden as no ungrab event is generated (they all are blocked by the modal dialog), and at the same time all the events are grabbed by menu and the X server looks locked.

To fix the problem we need to track how F10 is handled. After we find a frame with menubar that should receive this key event, we should first check if it is blocked and show menu only if it isn't.
                                     
2007-03-13
EVALUATION

F10 should not open menu in the parent Frame at all.
                                     
2007-03-15



Hardware and Software, Engineered to Work Together