]> git.saurik.com Git - wxWidgets.git/commitdiff
disable cursorRects for global busy state
authorStefan Csomor <csomor@advancedconcepts.ch>
Mon, 28 Feb 2011 14:47:32 +0000 (14:47 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Mon, 28 Feb 2011 14:47:32 +0000 (14:47 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67088 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/cocoa/utils.mm

index b164a64a739a19f986a1cfad0607917a2411b4ec..f8926e800b6c41d574ecd2e57a876273367f4b2d 100644 (file)
@@ -273,6 +273,13 @@ void wxBeginBusyCursor(const wxCursor *cursor)
 {
     if (gs_wxBusyCursorCount++ == 0)
     {
+        NSEnumerator *enumerator = [[[NSApplication sharedApplication] windows] objectEnumerator];
+        id object;
+        
+        while ((object = [enumerator nextObject])) {
+            [(NSWindow*) object disableCursorRects];
+        }        
+
         gMacStoredActiveCursor = gMacCurrentCursor;
         cursor->MacInstall();
 
@@ -289,10 +296,17 @@ void wxEndBusyCursor()
 
     if (--gs_wxBusyCursorCount == 0)
     {
-        gMacStoredActiveCursor.MacInstall();
-        gMacStoredActiveCursor = wxNullCursor;
+        NSEnumerator *enumerator = [[[NSApplication sharedApplication] windows] objectEnumerator];
+        id object;
+        
+        while ((object = [enumerator nextObject])) {
+            [(NSWindow*) object enableCursorRects];
+        }        
 
         wxSetCursor(wxNullCursor);
+
+        gMacStoredActiveCursor.MacInstall();
+        gMacStoredActiveCursor = wxNullCursor;
     }
 }