]> git.saurik.com Git - wxWidgets.git/commitdiff
adding correct behavior for move events as the are issued under OSX
authorStefan Csomor <csomor@advancedconcepts.ch>
Wed, 28 Mar 2012 09:13:40 +0000 (09:13 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Wed, 28 Mar 2012 09:13:40 +0000 (09:13 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71032 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/aui/floatpane.cpp

index 343ab6eb78a25c72263782b87672bad7c9af45e3..f33966740a1fc2fbc447e0b88da1868c13bd65a3 100644 (file)
@@ -216,6 +216,9 @@ void wxAuiFloatingFrame::OnMoveEvent(wxMoveEvent& event)
         return;
     }
 
+    // as on OSX moving windows are not getting all move events, only sporadically, this difference
+    // is almost always big on OSX, so avoid this early exit opportunity
+#ifndef __WXOSX__
     // skip if moving too fast to avoid massive redraws and
     // jumping hint windows
     if ((abs(winRect.x - m_lastRect.x) > 3) ||
@@ -235,6 +238,7 @@ void wxAuiFloatingFrame::OnMoveEvent(wxMoveEvent& event)
 
         return;
     }
+#endif
 
     // prevent frame redocking during resize
     if (m_lastRect.GetSize() != winRect.GetSize())
@@ -281,7 +285,10 @@ void wxAuiFloatingFrame::OnMoveEvent(wxMoveEvent& event)
     if (m_last3Rect.IsEmpty())
         return;
 
-    OnMoving(event.GetRect(), dir);
+    if ( event.GetEventType() == wxEVT_MOVING )
+        OnMoving(event.GetRect(), dir);
+    else 
+        OnMoving(wxRect(event.GetPosition(),GetSize()), dir);
 }
 
 void wxAuiFloatingFrame::OnIdle(wxIdleEvent& event)