--- old/src/windows/native/sun/windows/awt_Window.cpp 2013-08-25 02:20:31.028883400 +0400 +++ new/src/windows/native/sun/windows/awt_Window.cpp 2013-08-25 02:20:30.432307700 +0400 @@ -198,6 +198,7 @@ m_isFocusableWindow = TRUE; m_isRetainingHierarchyZOrder = FALSE; m_filterFocusAndActivation = FALSE; + m_isSnapResizing = FALSE; if (AwtWindow::ms_instanceCounter == 1) { AwtWindow::ms_hCBTFilter = @@ -1726,6 +1727,8 @@ MsgRouting AwtWindow::WmGetMinMaxInfo(LPMINMAXINFO lpmmi) { + m_isSnapResizing = FALSE; + MsgRouting r = AwtCanvas::WmGetMinMaxInfo(lpmmi); if ((m_minSize.x == 0) && (m_minSize.y == 0)) { return r; @@ -1766,6 +1769,8 @@ */ MsgRouting AwtWindow::WmSize(UINT type, int w, int h) { + m_isSnapResizing = TRUE; + currentWmSizeState = type; if (type == SIZE_MINIMIZED) { @@ -1881,7 +1886,7 @@ AwtWindow::DefWindowProc(message, wParam, lParam); } AwtWindow::sm_resizing = FALSE; - if (!AwtToolkit::GetInstance().IsDynamicLayoutActive()) { + if (!AwtToolkit::GetInstance().IsDynamicLayoutActive() || m_isSnapResizing) { WindowResized(); } mr = mrConsume; --- old/src/windows/native/sun/windows/awt_Window.h 2013-08-25 02:20:34.657344200 +0400 +++ new/src/windows/native/sun/windows/awt_Window.h 2013-08-25 02:20:34.083271300 +0400 @@ -273,6 +273,11 @@ BOOL m_isRetainingHierarchyZOrder; // Is this a window that shouldn't change z-order of any window // from its hierarchy when shown. Currently applied to instances of // javax/swing/Popup$HeavyWeightWindow class. + BOOL m_isSnapResizing; // Helps to determine whether system window's + // snapping occured by tracking the last message + // before WM_EXITSIZEMOVE among WM_GETMINMAXINFO + // and WM_SIZE. If WM_SIZE was the last one - the + // snapping occured. // SetTranslucency() is the setter for the following two fields BYTE m_opacity; // The opacity level. == 0xff by default (when opacity mode is disabled)