]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/window.cpp
added orient parameter to DrawSplitterSash instead of using wxMirrorDC in the splitte...
[wxWidgets.git] / src / mac / carbon / window.cpp
index 9587ffa3a7f9f7baca1c066f4bf2a33e29b8a930..ddb8eebf2b898759b80ea6be4385d41cb2652eb2 100644 (file)
@@ -75,7 +75,6 @@ BEGIN_EVENT_TABLE(wxWindowMac, wxWindowBase)
   EVT_ERASE_BACKGROUND(wxWindowMac::OnEraseBackground)
   EVT_SYS_COLOUR_CHANGED(wxWindowMac::OnSysColourChanged)
   EVT_INIT_DIALOG(wxWindowMac::OnInitDialog)
-  EVT_IDLE(wxWindowMac::OnIdle)
   EVT_SET_FOCUS(wxWindowMac::OnSetFocus)
   EVT_MOUSE_EVENTS(wxWindowMac::OnMouseEvent)
 END_EVENT_TABLE()
@@ -886,7 +885,10 @@ void wxWindowMac::Refresh(bool eraseBack, const wxRect *rect)
     if ( MacGetTopLevelWindow() == NULL )
         return ;
 
-    wxPoint client = GetClientAreaOrigin();
+    if ( !MacIsReallyShown() )
+       return ;
+     wxPoint client = GetClientAreaOrigin();
     int x1 = -client.x;
     int y1 = -client.y;
     int x2 = m_width - client.x;
@@ -1364,11 +1366,12 @@ void wxWindowMac::SetupColours()
         SetBackgroundColour(GetParent()->GetBackgroundColour());
 }
 
-void wxWindowMac::OnIdle(wxIdleEvent& event)
+void wxWindowMac::OnInternalIdle()
 {
     // This calls the UI-update mechanism (querying windows for
     // menu/toolbar/control state information)
-    UpdateWindowUI();
+    if (wxUpdateUIEvent::CanUpdate(this))
+        UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
 }
 
 // Raise the window to the top of the Z order