<AWT Dev> Code Review Request for CR 7128738 - dragged dialog freezes system on dispose
Artem Ananiev
artem.ananiev at oracle.com
Wed Mar 14 11:42:48 PDT 2012
The fix looks fine (thanks for the detailed description of what's
going!), modulo Anthony's suggestion about a new regression test.
Thanks,
Artem
On 3/13/2012 2:54 PM, Oleg Pekhovskiy wrote:
> Hi guys,
>
> please review the fix for:
> http://bugs.sun.com/view_bug.do?bug_id=7128738
>
> webrev:
> http://cr.openjdk.java.net/~bagiras/7128738.1
>
> Description:
>
> 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
> deleted.
>
> Thanks,
> Oleg
More information about the awt-dev
mailing list