X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/707005337735f36dbf1f13d83956f8c08e996191..5ed738a766bb06539893bd424759e75926c43e15:/src/common/wincmn.cpp?ds=inline diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index b76a5c348c..6ffcaea012 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -152,6 +152,7 @@ void wxWindowBase::InitBase() m_constraints = (wxLayoutConstraints *) NULL; m_constraintsInvolvedIn = (wxWindowList *) NULL; m_windowSizer = (wxSizer *) NULL; + m_containingSizer = (wxSizer *) NULL; m_autoLayout = FALSE; #endif // wxUSE_CONSTRAINTS @@ -257,6 +258,9 @@ wxWindowBase::~wxWindowBase() m_constraints = NULL; } + if ( m_containingSizer ) + m_containingSizer->Remove((wxWindow*)this); + if ( m_windowSizer ) delete m_windowSizer; @@ -1194,9 +1198,6 @@ bool wxWindowBase::Layout() GetClientSize(&w, &h); GetSizer()->SetDimension( 0, 0, w, h ); -#if defined __WXPM__ - OS2Layout(w, h); -#endif } else { @@ -1707,6 +1708,11 @@ void wxWindowBase::CaptureMouse() wxWindow *winOld = GetCapture(); if ( winOld ) { + // I think this is correct, but not compatible with some ports +#if defined(__WXX11__) || defined(__WXMGL__) + ((wxWindowBase*) winOld)->DoReleaseMouse(); +#endif + // save it on stack wxWindowNext *item = new wxWindowNext; item->win = winOld; @@ -1728,8 +1734,13 @@ void wxWindowBase::ReleaseMouse() if ( ms_winCaptureNext ) { + // I think this is correct, but not compatible with some ports +#if defined(__WXX11__) || defined(__WXMGL__) + ((wxWindowBase*)ms_winCaptureNext->win)->DoCaptureMouse(); +#else ms_winCaptureNext->win->CaptureMouse(); - +#endif + wxWindowNext *item = ms_winCaptureNext; ms_winCaptureNext = item->next; delete item;