src/windows/native/sun/windows/awt_Window.h

Print this page

        

@@ -141,10 +141,11 @@
                              jintArray smallIconData, jint smw, jint smh);
     virtual void DoUpdateIcon();
     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);
     void SendWindowEvent(jint id, HWND opposite = NULL,
                          jint oldState = 0, jint newState = 0);

@@ -191,12 +192,14 @@
 
     virtual BOOL AwtSetActiveWindow(BOOL isMouseEventCause = FALSE, UINT hittest = HTCLIENT);
 
     // Execute on Toolkit only.
     INLINE static LRESULT SynthesizeWmActivate(BOOL doActivate, HWND targetHWnd, HWND oppositeHWnd) {
+        AwtWindow *win = static_cast<AwtWindow*>(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;