From: Stefan Csomor Date: Mon, 28 Feb 2011 14:47:32 +0000 (+0000) Subject: disable cursorRects for global busy state X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/3ac8892150aa02e775c13da2ca8a5d40478da962 disable cursorRects for global busy state git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67088 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/osx/cocoa/utils.mm b/src/osx/cocoa/utils.mm index b164a64a73..f8926e800b 100644 --- a/src/osx/cocoa/utils.mm +++ b/src/osx/cocoa/utils.mm @@ -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; } }