<AWT Dev> Code Review Request for CR 7128738 - dragged dialog freezes system on dispose
oleg.pekhovskiy at oracle.com
Tue Mar 13 14:54:34 PDT 2012
please review the fix for:
Entering 'move window' mode clicking window title bar sends
WM_SYSCOMMAND with SC_MOVE inside WM_NCLBUTTONDOWN.
As a result additional message pump (for mouse capture) is created
blocking the handlers' chain WM_NCLBUTTONDOWN -> WM_SYSCOMMAND.
So when JFrame.dispose() is called during this situation, deleting of
native AwtFrame object could NOT be done because
AwtComponent::CanBeDeleted() returns FALSE
(because of WM_NCLBUTTONDOWN & WM_SYSCOMMAND) and WM_AWT_DELETEOBJECT
message is reposted over and over again (eating CPU time).
Thus I added ReleaseDragCapture(0) to AwtComponent::Dispose() to release
mouse capture and finish the additional message pump
so that AwtComponent::CanBeDeleted() returns TRUE and AwtFrame object is
More information about the awt-dev