+
+ wxWindow* mouseUpTarget = wxWindow::GetCapture();
+
+ if ( mouseUpTarget == NULL )
+ {
+ mouseUpTarget = m_window;
+ }
+
+ if ( mouseUpTarget != NULL )
+ {
+ wxMouseEvent wxevent(wxEVT_LEFT_DOWN);
+ ((wxWidgetCocoaImpl*)mouseUpTarget->GetPeer())->SetupMouseEvent(wxevent , theEvent) ;
+ wxevent.SetEventType(wxEVT_LEFT_UP);
+
+ mouseUpTarget->HandleWindowEvent(wxevent);
+ }
+