+ // we leave the loop once we have processed all events that were present at
+ // the start of ProcessPendingEvents because otherwise we could get into
+ // infinite loop if the pending event handler execution resulted in another
+ // event being posted
+ size_t n = m_pendingEvents->size();
+ for ( wxList::compatibility_iterator node = m_pendingEvents->GetFirst();
+ node;
+ node = m_pendingEvents->GetFirst() )