]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/wincmn.cpp
Font change for OS/2 to a smaller font.
[wxWidgets.git] / src / common / wincmn.cpp
index 2b63369661c55bc655391241efccbe6877cc8a0f..2801de986d8701fd34a32cee7fded582e7f4beff 100644 (file)
@@ -214,6 +214,8 @@ bool wxWindowBase::CreateBase(wxWindowBase *parent,
 // common clean up
 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
     //       we should probably assert here instead of silently fixing them
 
@@ -1625,7 +1627,7 @@ struct WXDLLEXPORT wxWindowNext
 void wxWindowBase::CaptureMouse()
 {
     wxLogTrace(_T("mousecapture"), _T("CaptureMouse(0x%08x)"), this);
-
+    
     wxWindow *winOld = GetCapture();
     if ( winOld )
     {
@@ -1642,6 +1644,10 @@ void wxWindowBase::CaptureMouse()
 
 void wxWindowBase::ReleaseMouse()
 {
+    wxLogTrace(_T("mousecapture"), _T("ReleaseMouse(0x%08x)"), this);
+
+    wxASSERT_MSG( GetCapture() == this, wxT("attempt to release mouse, but this window hasn't captured it") )
+
     DoReleaseMouse();
 
     if ( ms_winCaptureNext )