src/windows/native/sun/windows/awt_Frame.cpp

Print this page




 967     if (AwtComponent::GetFocusedWindow() != GetHWnd()) {
 968         // Make sure the actual focused window is an owned window of this frame
 969         AwtWindow *focusedWindow = (AwtWindow *)AwtComponent::GetComponent(AwtComponent::GetFocusedWindow());
 970         if (focusedWindow != NULL && focusedWindow->GetOwningFrameOrDialog() == this) {
 971 
 972             // Check that the opposite window is not this frame, nor an owned window of this frame
 973             if (activatedOpositeHWnd != NULL) {
 974                 AwtWindow *oppositeWindow = (AwtWindow *)AwtComponent::GetComponent(activatedOpositeHWnd);
 975                 if (oppositeWindow && oppositeWindow != this &&
 976                     oppositeWindow->GetOwningFrameOrDialog() != this)
 977                 {
 978                     m_actualFocusedWindow = focusedWindow;
 979                 }
 980             } else {
 981                  m_actualFocusedWindow = focusedWindow;
 982             }
 983         }
 984     }
 985 }
 986 
 987 BOOL AwtFrame::AwtSetActiveWindow(BOOL isMouseEventCause, UINT hittest)
 988 {
 989     if (hittest == HTCLIENT) {
 990         // Don't let the actualFocusedWindow to steal focus if:
 991         // a) the frame is clicked in its client area;
 992         // b) focus is requested to some of the frame's child.
 993         m_actualFocusedWindow = NULL;
 994     }
 995     return AwtWindow::AwtSetActiveWindow(isMouseEventCause);
 996 }
 997 
 998 MsgRouting AwtFrame::WmEnterMenuLoop(BOOL isTrackPopupMenu)
 999 {
1000     if ( !isTrackPopupMenu ) {
1001         m_isMenuDropped = TRUE;
1002     }
1003     return mrDoDefault;
1004 }
1005 
1006 MsgRouting AwtFrame::WmExitMenuLoop(BOOL isTrackPopupMenu)
1007 {
1008     if ( !isTrackPopupMenu ) {
1009         m_isMenuDropped = FALSE;
1010     }
1011     return mrDoDefault;
1012 }
1013 
1014 AwtMenuBar* AwtFrame::GetMenuBar()
1015 {




 967     if (AwtComponent::GetFocusedWindow() != GetHWnd()) {
 968         // Make sure the actual focused window is an owned window of this frame
 969         AwtWindow *focusedWindow = (AwtWindow *)AwtComponent::GetComponent(AwtComponent::GetFocusedWindow());
 970         if (focusedWindow != NULL && focusedWindow->GetOwningFrameOrDialog() == this) {
 971 
 972             // Check that the opposite window is not this frame, nor an owned window of this frame
 973             if (activatedOpositeHWnd != NULL) {
 974                 AwtWindow *oppositeWindow = (AwtWindow *)AwtComponent::GetComponent(activatedOpositeHWnd);
 975                 if (oppositeWindow && oppositeWindow != this &&
 976                     oppositeWindow->GetOwningFrameOrDialog() != this)
 977                 {
 978                     m_actualFocusedWindow = focusedWindow;
 979                 }
 980             } else {
 981                  m_actualFocusedWindow = focusedWindow;
 982             }
 983         }
 984     }
 985 }
 986 
 987 BOOL AwtFrame::AwtSetActiveWindow(UINT hittest)
 988 {
 989     if (hittest == HTCLIENT) {
 990         // Don't let the actualFocusedWindow to steal focus if:
 991         // a) the frame is clicked in its client area;
 992         // b) focus is requested to some of the frame's child.
 993         m_actualFocusedWindow = NULL;
 994     }
 995     return AwtWindow::AwtSetActiveWindow();
 996 }
 997 
 998 MsgRouting AwtFrame::WmEnterMenuLoop(BOOL isTrackPopupMenu)
 999 {
1000     if ( !isTrackPopupMenu ) {
1001         m_isMenuDropped = TRUE;
1002     }
1003     return mrDoDefault;
1004 }
1005 
1006 MsgRouting AwtFrame::WmExitMenuLoop(BOOL isTrackPopupMenu)
1007 {
1008     if ( !isTrackPopupMenu ) {
1009         m_isMenuDropped = FALSE;
1010     }
1011     return mrDoDefault;
1012 }
1013 
1014 AwtMenuBar* AwtFrame::GetMenuBar()
1015 {