X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c3a05e8a571f743b8213aea46ea7369126ed63b2..5f3f0f1725cc5e906caa6a81e368d0c8b29702ea:/src/mac/carbon/window.cpp?ds=sidebyside diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index aa3e705ea1..74d6c9730d 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/window.cpp @@ -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() @@ -1352,14 +1351,6 @@ void wxWindowMac::OnSetFocus(wxFocusEvent& event) event.Skip(); } -void wxWindowMac::Clear() -{ - wxClientDC dc(this); - wxBrush brush(GetBackgroundColour(), wxSOLID); - dc.SetBackground(brush); - dc.Clear(); -} - // Setup background and foreground colours correctly void wxWindowMac::SetupColours() { @@ -1367,11 +1358,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