--- old/src/windows/native/sun/windows/awt_Window.h 2013-02-15 13:38:05.000000000 +0400 +++ new/src/windows/native/sun/windows/awt_Window.h 2013-02-15 13:38:04.000000000 +0400 @@ -143,6 +143,7 @@ INLINE HICON GetHIcon() {return m_hIcon;}; INLINE HICON GetHIconSm() {return m_hIconSm;}; INLINE BOOL IsIconInherited() {return m_iconInherited;}; + INLINE virtual BOOL IsLightweightFrame() {return FALSE;} /* Post events to the EventQueue */ void SendComponentEvent(jint eventId); @@ -193,13 +194,15 @@ // Execute on Toolkit only. INLINE static LRESULT SynthesizeWmActivate(BOOL doActivate, HWND targetHWnd, HWND oppositeHWnd) { + AwtWindow *win = static_cast(AwtComponent::GetComponent(targetHWnd)); if (doActivate && - (!::IsWindowVisible(targetHWnd) || ::IsIconic(::GetAncestor(targetHWnd, GA_ROOT)))) + (!::IsWindowVisible(targetHWnd) || ::IsIconic(::GetAncestor(targetHWnd, GA_ROOT))) && + (win == NULL || !win->IsLightweightFrame())) { // The activation is rejected if either: // - The toplevel is not visible // - The toplevel (or its embedder) is minimised - return 1; + return 1; } return ::SendMessage(targetHWnd, WM_ACTIVATE, MAKEWPARAM(doActivate ? WA_ACTIVE : WA_INACTIVE, FALSE),