setting up current event also when mouse is captured ...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70694 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -120,9 +120,14 @@ bool shouldHandleSelector(SEL selector)
|
|||||||
bool handled = false;
|
bool handled = false;
|
||||||
if ( ([event type] >= NSLeftMouseDown) && ([event type] <= NSMouseExited) )
|
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();
|
wxWindow* cw = wxWindow::GetCapture();
|
||||||
if ( cw != NULL )
|
if ( cw != NULL )
|
||||||
{
|
{
|
||||||
|
if (wxTheApp)
|
||||||
|
wxTheApp->MacSetCurrentEvent(event, NULL);
|
||||||
((wxWidgetCocoaImpl*)cw->GetPeer())->DoHandleMouseEvent( event);
|
((wxWidgetCocoaImpl*)cw->GetPeer())->DoHandleMouseEvent( event);
|
||||||
handled = true;
|
handled = true;
|
||||||
}
|
}
|
||||||
@@ -136,10 +141,17 @@ bool shouldHandleSelector(SEL selector)
|
|||||||
wxWindow* mw = ::wxFindWindowAtPoint(pt);
|
wxWindow* mw = ::wxFindWindowAtPoint(pt);
|
||||||
if ( mw )
|
if ( mw )
|
||||||
{
|
{
|
||||||
|
if (wxTheApp)
|
||||||
|
wxTheApp->MacSetCurrentEvent(event, NULL);
|
||||||
((wxWidgetCocoaImpl*)mw->GetPeer())->DoHandleMouseEvent( event);
|
((wxWidgetCocoaImpl*)mw->GetPeer())->DoHandleMouseEvent( event);
|
||||||
handled = true;
|
handled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ( handled )
|
||||||
|
{
|
||||||
|
if (wxTheApp)
|
||||||
|
wxTheApp->MacSetCurrentEvent(formerEvent , formerHandler);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return handled;
|
return handled;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user