avoid setting live cursor during busy state

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67087 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2011-02-28 14:39:37 +00:00
parent 4c00ce28bd
commit 201c6db3e4

View File

@@ -2143,13 +2143,16 @@ void wxWidgetCocoaImpl::DoNotifyFocusEvent(bool receivedFocus, wxWidgetImpl* oth
void wxWidgetCocoaImpl::SetCursor(const wxCursor& cursor)
{
NSPoint location = [NSEvent mouseLocation];
location = [[m_osxView window] convertScreenToBase:location];
NSPoint locationInView = [m_osxView convertPoint:location fromView:nil];
if( NSMouseInRect(locationInView, [m_osxView bounds], YES) )
if ( !wxIsBusy() )
{
[(NSCursor*)cursor.GetHCURSOR() set];
NSPoint location = [NSEvent mouseLocation];
location = [[m_osxView window] convertScreenToBase:location];
NSPoint locationInView = [m_osxView convertPoint:location fromView:nil];
if( NSMouseInRect(locationInView, [m_osxView bounds], YES) )
{
[(NSCursor*)cursor.GetHCURSOR() set];
}
}
[[m_osxView window] invalidateCursorRectsForView:m_osxView];
}