X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6ed71b4f20f93f08c0e2cde72d81fc5b43d3195e..62dc9cb4f159e2d4cac08308b96e63238935e6bb:/src/mac/carbon/window.cpp?ds=inline diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index 9587ffa3a7..ddb8eebf2b 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() @@ -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