git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70694
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
bool handled = false;
if ( ([event type] >= NSLeftMouseDown) && ([event type] <= NSMouseExited) )
{
bool handled = false;
if ( ([event type] >= NSLeftMouseDown) && ([event type] <= NSMouseExited) )
{
+ WXEVENTREF formerEvent = wxTheApp == NULL ? NULL : wxTheApp->MacGetCurrentEvent();
+ WXEVENTHANDLERCALLREF formerHandler = wxTheApp == NULL ? NULL : wxTheApp->MacGetCurrentEventHandlerCallRef();
+
wxWindow* cw = wxWindow::GetCapture();
if ( cw != NULL )
{
wxWindow* cw = wxWindow::GetCapture();
if ( cw != NULL )
{
+ if (wxTheApp)
+ wxTheApp->MacSetCurrentEvent(event, NULL);
((wxWidgetCocoaImpl*)cw->GetPeer())->DoHandleMouseEvent( event);
handled = true;
}
((wxWidgetCocoaImpl*)cw->GetPeer())->DoHandleMouseEvent( event);
handled = true;
}
wxWindow* mw = ::wxFindWindowAtPoint(pt);
if ( mw )
{
wxWindow* mw = ::wxFindWindowAtPoint(pt);
if ( mw )
{
+ if (wxTheApp)
+ wxTheApp->MacSetCurrentEvent(event, NULL);
((wxWidgetCocoaImpl*)mw->GetPeer())->DoHandleMouseEvent( event);
handled = true;
}
}
((wxWidgetCocoaImpl*)mw->GetPeer())->DoHandleMouseEvent( event);
handled = true;
}
}
+ if ( handled )
+ {
+ if (wxTheApp)
+ wxTheApp->MacSetCurrentEvent(formerEvent , formerHandler);
+ }
[editor release];
}
return editor;
[editor release];
}
return editor;