case wxCURSOR_BASED_ARROW_DOWN: gdk_cur = GDK_BASED_ARROW_DOWN; break;
*/
default:
- wxFAIL_MSG("unsupported cursor type");
+ wxFAIL_MSG(_T("unsupported cursor type"));
// will use the standard one
case wxCURSOR_ARROW:
extern wxCursor *g_globalCursor;
static wxCursor *gs_savedCursor = NULL;
+static int gs_busyCount = 0;
void wxEndBusyCursor()
{
+ if ( --gs_busyCount > 0 )
+ return;
+
wxCHECK_RET( gs_savedCursor && gs_savedCursor->Ok(),
- "calling wxEndBusyCursor() without wxBeginBusyCursor()?" );
+ _T("calling wxEndBusyCursor() without wxBeginBusyCursor()?") );
wxSetCursor(*gs_savedCursor);
delete gs_savedCursor;
void wxBeginBusyCursor( wxCursor *WXUNUSED(cursor) )
{
+ if ( gs_busyCount++ > 0 )
+ return;
+
wxASSERT_MSG( !gs_savedCursor,
- "forgot to call wxEndBusyCursor, will leak memory" );
+ _T("forgot to call wxEndBusyCursor, will leak memory") );
gs_savedCursor = new wxCursor;
if ( g_globalCursor && g_globalCursor->Ok() )
bool wxIsBusy()
{
- return gs_savedCursor != NULL;
+ return gs_busyCount > 0;
}
void wxSetCursor( const wxCursor& cursor )
{
if (g_globalCursor) (*g_globalCursor) = cursor;
}
-
-