]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/framecmn.cpp
To avoid error message, do not even try to set focus on MSW popup window that doesn...
[wxWidgets.git] / src / common / framecmn.cpp
index f09e2c67cc704fa565040cc7018830cf14a125d2..206c959dfb1039b8636700b32f9dab983da63d0c 100644 (file)
@@ -170,15 +170,6 @@ wxPoint wxFrameBase::GetClientAreaOrigin() const
     return pt;
 }
 
     return pt;
 }
 
-
-void wxFrameBase::SendSizeEvent()
-{
-    wxSizeEvent event( GetSize(), GetId() );
-    event.SetEventObject( this );
-    GetEventHandler()->AddPendingEvent( event );
-}
-
-
 // ----------------------------------------------------------------------------
 // misc
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 // misc
 // ----------------------------------------------------------------------------
@@ -237,14 +228,12 @@ void wxFrameBase::UpdateWindowUI(long flags)
 #if wxUSE_MENUS
     if (GetMenuBar())
     {
 #if wxUSE_MENUS
     if (GetMenuBar())
     {
-        if ((flags & wxUPDATE_UI_FROMIDLE) && !wxUSE_IDLEMENUUPDATES)
-        {
-            // If coming from an idle event, we only
-            // want to update the menus if we're
-            // in the wxUSE_IDLEMENUUPDATES configuration:
-            // so if we're not, do nothing
-        }
-        else
+        // If coming from an idle event, we only want to update the menus if
+        // we're in the wxUSE_IDLEMENUUPDATES configuration, otherwise they
+        // will be update when the menu is opened later
+#if !wxUSE_IDLEMENUUPDATES
+        if ( !(flags & wxUPDATE_UI_FROMIDLE) )
+#endif // wxUSE_IDLEMENUUPDATES
             DoMenuUpdates();
     }
 #endif // wxUSE_MENUS
             DoMenuUpdates();
     }
 #endif // wxUSE_MENUS
@@ -263,15 +252,14 @@ void wxFrameBase::OnMenuHighlight(wxMenuEvent& event)
 #endif // wxUSE_STATUSBAR
 }
 
 #endif // wxUSE_STATUSBAR
 }
 
-#if !wxUSE_IDLEMENUUPDATES
 void wxFrameBase::OnMenuOpen(wxMenuEvent& event)
 void wxFrameBase::OnMenuOpen(wxMenuEvent& event)
-#else
-void wxFrameBase::OnMenuOpen(wxMenuEvent& WXUNUSED(event))
-#endif
 {
 {
-#if !wxUSE_IDLEMENUUPDATES
+#if wxUSE_IDLEMENUUPDATES
+    wxUnusedVar(event);
+#else // !wxUSE_IDLEMENUUPDATES
+    // as we didn't update the menus from idle time, do it now
     DoMenuUpdates(event.GetMenu());
     DoMenuUpdates(event.GetMenu());
-#endif // !wxUSE_IDLEMENUUPDATES
+#endif // wxUSE_IDLEMENUUPDATES/!wxUSE_IDLEMENUUPDATES
 }
 
 void wxFrameBase::OnMenuClose(wxMenuEvent& WXUNUSED(event))
 }
 
 void wxFrameBase::OnMenuClose(wxMenuEvent& WXUNUSED(event))