X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/63e819f2981585279fe8a06629f69b7002eee9dc..bc023abbbbd2b136da9ff65efbbb726daa9fc907:/src/common/wincmn.cpp diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index 101c995e7f..e9d6e9eda1 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -396,7 +396,7 @@ void wxWindowBase::Fit() { if ( !GetChildren().empty() ) { - SetClientSize(GetBestSize()); + SetSize(GetBestSize()); } //else: do nothing if we have no children } @@ -2399,14 +2399,14 @@ static void DoNotifyWindowAboutCaptureLost(wxWindow *win) { wxMouseCaptureLostEvent event(win->GetId()); event.SetEventObject(win); - bool processed = win->GetEventHandler()->ProcessEvent(event); - - wxASSERT_MSG( processed, - _T("window that captured mouse didn't process wxEVT_MOUSE_CAPTURE_LOST") ); + if ( !win->GetEventHandler()->ProcessEvent(event) ) + { + wxFAIL_MSG( _T("window that captured the mouse didn't process wxEVT_MOUSE_CAPTURE_LOST") ); + } } /* static */ -void wxWindowBase::NotifyCaptureLost(wxWindow *gainedCapture) +void wxWindowBase::NotifyCaptureLost() { // don't do anything if capture lost was expected, i.e. resulted from // a wx call to ReleaseMouse or CaptureMouse: