From 072db400deed678005905202e734b97b4ed74738 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Tue, 12 Feb 2002 17:31:23 +0000 Subject: [PATCH] Modified CaptureMouse to call DoReleaseMouse if necessary before doing another DoCaptureMouse, because otherwise we have a nested Capture which is not possible in some systems (the point of these wrappers). Also ReleaseMouse now calls DoCaptureMouse, not CaptureMouse, if necessary. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14159 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/wincmn.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index 26cdbc173e..0f7a0231e3 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -1704,6 +1704,7 @@ void wxWindowBase::CaptureMouse() wxWindow *winOld = GetCapture(); if ( winOld ) { + winOld->DoReleaseMouse(); // save it on stack wxWindowNext *item = new wxWindowNext; item->win = winOld; @@ -1725,7 +1726,7 @@ void wxWindowBase::ReleaseMouse() if ( ms_winCaptureNext ) { - ms_winCaptureNext->win->CaptureMouse(); + ms_winCaptureNext->win->DoCaptureMouse(); wxWindowNext *item = ms_winCaptureNext; ms_winCaptureNext = item->next;