added tracing of ReleaseMouse and assertion to prevent releasing window with mouse capture
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13672 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
697c5f5148
commit
349d19426c
@ -214,6 +214,8 @@ bool wxWindowBase::CreateBase(wxWindowBase *parent,
|
|||||||
// common clean up
|
// common clean up
|
||||||
wxWindowBase::~wxWindowBase()
|
wxWindowBase::~wxWindowBase()
|
||||||
{
|
{
|
||||||
|
wxASSERT_MSG( GetCapture() != this, wxT("attempt to destroy window with mouse capture") );
|
||||||
|
|
||||||
// FIXME if these 2 cases result from programming errors in the user code
|
// FIXME if these 2 cases result from programming errors in the user code
|
||||||
// we should probably assert here instead of silently fixing them
|
// we should probably assert here instead of silently fixing them
|
||||||
|
|
||||||
@ -1625,7 +1627,7 @@ struct WXDLLEXPORT wxWindowNext
|
|||||||
void wxWindowBase::CaptureMouse()
|
void wxWindowBase::CaptureMouse()
|
||||||
{
|
{
|
||||||
wxLogTrace(_T("mousecapture"), _T("CaptureMouse(0x%08x)"), this);
|
wxLogTrace(_T("mousecapture"), _T("CaptureMouse(0x%08x)"), this);
|
||||||
|
|
||||||
wxWindow *winOld = GetCapture();
|
wxWindow *winOld = GetCapture();
|
||||||
if ( winOld )
|
if ( winOld )
|
||||||
{
|
{
|
||||||
@ -1642,6 +1644,8 @@ void wxWindowBase::CaptureMouse()
|
|||||||
|
|
||||||
void wxWindowBase::ReleaseMouse()
|
void wxWindowBase::ReleaseMouse()
|
||||||
{
|
{
|
||||||
|
wxLogTrace(_T("mousecapture"), _T("ReleaseMouse(0x%08x)"), this);
|
||||||
|
|
||||||
DoReleaseMouse();
|
DoReleaseMouse();
|
||||||
|
|
||||||
if ( ms_winCaptureNext )
|
if ( ms_winCaptureNext )
|
||||||
|
Loading…
Reference in New Issue
Block a user