diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index 643db6adf5..7780dbd2a7 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -1704,7 +1704,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; @@ -1726,8 +1730,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;