]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/window.cpp
corrected pragma interface/implementation for Mac OS X
[wxWidgets.git] / src / gtk1 / window.cpp
index 15b54ffc16f9773d70d4959560877edfd85c1fa0..8dfbf2b0962ba6f1ff4ac7b5b445fc45466b4b05 100644 (file)
@@ -3743,15 +3743,13 @@ void wxWindowGTK::CaptureMouse()
 {
     wxCHECK_RET( m_widget != NULL, wxT("invalid window") );
 
-    wxCHECK_RET( g_captureWindow == NULL, wxT("CaptureMouse called twice") );
-
     GdkWindow *window = (GdkWindow*) NULL;
     if (m_wxwindow)
         window = GTK_PIZZA(m_wxwindow)->bin_window;
     else
         window = GetConnectWidget()->window;
 
-    if (!window) return;
+    wxCHECK_RET( window, _T("CaptureMouse() failed") );
 
     wxCursor* cursor = & m_cursor;
     if (!cursor->Ok())
@@ -3774,7 +3772,7 @@ void wxWindowGTK::ReleaseMouse()
 {
     wxCHECK_RET( m_widget != NULL, wxT("invalid window") );
 
-    wxCHECK_RET( g_captureWindow, wxT("ReleaseMouse called twice") );
+    wxCHECK_RET( g_captureWindow, wxT("can't release mouse - not captured") );
 
     GdkWindow *window = (GdkWindow*) NULL;
     if (m_wxwindow)