]> git.saurik.com Git - wxWidgets.git/commitdiff
avoid setting live cursor during busy state
authorStefan Csomor <csomor@advancedconcepts.ch>
Mon, 28 Feb 2011 14:39:37 +0000 (14:39 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Mon, 28 Feb 2011 14:39:37 +0000 (14:39 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67087 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/cocoa/window.mm

index df70c1e5f9060c11f08d393aa9cdb2bb2144d55e..f7cbe4fb7cf55cdbb668cd1caa0052d82cb29958 100644 (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];
 }