]> git.saurik.com Git - wxWidgets.git/commitdiff
Restored previous mouse release/capture behaviour for some ports
authorJulian Smart <julian@anthemion.co.uk>
Thu, 14 Feb 2002 15:47:01 +0000 (15:47 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Thu, 14 Feb 2002 15:47:01 +0000 (15:47 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14205 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/wincmn.cpp

index 643db6adf56f75fed113804543550bcb4b2f0330..7780dbd2a7b02860d54a21f71bc6b9eabbe89f29 100644 (file)
@@ -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;