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()?" );
void wxBeginBusyCursor( wxCursor *WXUNUSED(cursor) )
{
+ if ( gs_busyCount++ > 0 )
+ return;
+
wxASSERT_MSG( !gs_savedCursor,
"forgot to call wxEndBusyCursor, will leak memory" );
bool wxIsBusy()
{
- return gs_savedCursor != NULL;
+ return gs_busyCount > 0;
}
void wxSetCursor( const wxCursor& cursor )