X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4d163bf87d765aae365ee93742cfb96e1ef5c12d..64c11164f0a9ed48a69d0ef3f77ae03e11671394:/src/mgl/window.cpp diff --git a/src/mgl/window.cpp b/src/mgl/window.cpp index 70a9ffaf64..082e7dc7c8 100644 --- a/src/mgl/window.cpp +++ b/src/mgl/window.cpp @@ -184,7 +184,7 @@ static ibool MGLAPI wxWindowMouseHandler(window_t *wnd, event_t *e) { case EVT_MOUSEDOWN: // Change focus if the user clicks outside focused window: - if ( win->AcceptsFocus() && wxWindow::FindFocus() != win ) + if ( win->CanAcceptFocus() && wxWindow::FindFocus() != win ) win->SetFocus(); if ( e->message & EVT_DBLCLICK ) @@ -1099,14 +1099,6 @@ void wxWindowMGL::GetTextExtent(const wxString& string, // painting // --------------------------------------------------------------------------- -void wxWindowMGL::Clear() -{ - wxClientDC dc((wxWindow *)this); - wxBrush brush(GetBackgroundColour(), wxSOLID); - dc.SetBackground(brush); - dc.Clear(); -} - void wxWindowMGL::Refresh(bool eraseBack, const wxRect *rect) { if ( m_eraseBackground == -1 ) @@ -1225,6 +1217,6 @@ wxWindow* wxFindWindowAtPoint(const wxPoint& pt) void wxWindowMGL::OnInternalIdle() { - if (wxUpdateUIEvent::CanUpdate(this)) + if (wxUpdateUIEvent::CanUpdate(this) && IsShown()) UpdateWindowUI(wxUPDATE_UI_FROMIDLE); }