United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6769607 PIT : Modal frame hangs for a while for few seconds in 6u12 b01 pit build
JDK-6769607 : PIT : Modal frame hangs for a while for few seconds in 6u12 b01 pit build

Details
Type:
Bug
Submit Date:
2008-11-10
Status:
Resolved
Updated Date:
2011-01-19
Project Name:
JDK
Resolved Date:
2008-12-03
Component:
client-libs
OS:
windows_xp
Sub-Component:
java.awt
CPU:
x86
Priority:
P2
Resolution:
Fixed
Affected Versions:
6u12
Fixed Versions:
6u12 (b02)

Related Reports
Backport:
Relates:

Sub Tasks

Description
I have a frame which contains a button , when i press the space bar , another frame is displayed as the first frame acts a modal frame for the second. this chain goes on until you stop creating the new window.  When all the frames are visible, i click on each frame from the newly created frame to the first frame. Then for a while the whole set of frame hangs.  

Step to reproduced:-
-----------------------
1) Run testcase in the CR.
2) Keeping on pressing space bar . Once you see 16 frame. stop it.
3) Click each frame from low order to upper order i,e frame 15, frame14 , frame3...frame1.
4) Observe that frame16 focus border is not drawn correctly. at least the upper part. 5) Now press escape key 4 to 5 times. You will see that different frame are not painted correctly or seen above the other. 

I tested this with 6u12 b01 pit build.

                                    

Comments
EVALUATION

This is a regression of the fix for 6714829. When the user clicks on any blocked window, AWT activates all blocker windows by calling ::BringWindowToTop on all these windows (refer to the AWT modal hook routine - AwtDialog::ModalFilterProc). If I comment the ::BringWindowToTop call, then the problem goes away. It looks like activating several windows inside the AWT modal hook procedure (WH_CBT hook) is wrong, underlying system generates many WM_WINDOWPOSCHANGING messages and the system goes into infinite loop.
                                     
2008-11-10
EVALUATION

The AWT modal|mouse hooks call ::BringWindowToTop() to place the blocker dialogs at the top of the Z order. It covers the cases when the blocker dialogs are under other native windows and the blocker dialogs should popup over all native windows when the user clicks on the blocked window. ::BringWindowToTop activate the dialogs and so the underlying system generates new WM_ACTIVATE messages, then AWT gets into the hooks again and calls the ::BringWindowToTop() again and so on. Using ::SetWindowPos(...,HWND_TOP,...) with the SWP_NOACTIVATE flag instead of ::BringWindowToTop fixes the problem.
                                     
2008-11-11



Hardware and Software, Engineered to Work Together