<AWT Dev> [8] Review request for 8016356: Any swing frame resizes ugly.

Anthony Petrov anthony.petrov at oracle.com
Mon Aug 26 06:20:25 PDT 2013

Hi Oleg,

The fix looks somewhat fragile to me. The sequence of events may change 
in a future version of Windows, and the fix will fail then.

Are there any peculiarities for the WM_SIZE messages being posted when a 
window is snapped? I'm referring to [1] for example, and they suggest 
that a proper SC_ flag might be specified when snapping occurs. So, if 
we could detect that, we might unblock the WindowResized() call at the 
end of the WmSize() method in the AwtWindow class, which would fix the 
issue. You might also want to explore the WM_WINDOWPOSCHANGED and 
WM_WINDOWPOSCHANGING events that the window receives during snapping, 
perhaps they have some characteristics allowing us to ignore the 
IsResizing() and call the WindowResized() nonetheless.


best regards,

On 08/25/13 16:40, Oleg Pekhovskiy wrote:
> Hi all,
> please review the fix
> http://cr.openjdk.java.net/~bagiras/8016356.1/
> for
> http://bugs.sun.com/view_bug.do?bug_id=8016356
> Windows 7 has a feature that makes "window being automatically arranged
> when moved to the edge of the screen". And there is no specific system
> notification when that happens. From the other side AwtWindow class has
> some optimization algorithm for resizing that doesn't take into account
> such the arranging. I found indirect way to determine the arranging by
> tracking the sequence of WM_GETMINMAXINFO and WM_SIZE before the end of
> resizing routine, and call WindowResized() when needed to update the
> layout.
> Thanks,
> Oleg

More information about the awt-dev mailing list