]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/event.cpp
static wxFile::Access() added
[wxWidgets.git] / src / common / event.cpp
index d3cb798bdf81a1b0920c2b44deb1b537c43ea838..09a8f871d0f058cd7f4dd237935e8a523cbe8009 100644 (file)
@@ -56,6 +56,8 @@ IMPLEMENT_DYNAMIC_CLASS(wxSysColourChangedEvent, wxEvent)
 IMPLEMENT_DYNAMIC_CLASS(wxIdleEvent, wxEvent)
 IMPLEMENT_DYNAMIC_CLASS(wxUpdateUIEvent, wxEvent)
 IMPLEMENT_DYNAMIC_CLASS(wxNavigationKeyEvent, wxCommandEvent)
+IMPLEMENT_DYNAMIC_CLASS(wxPaletteChangedEvent, wxEvent)
+IMPLEMENT_DYNAMIC_CLASS(wxQueryNewPaletteEvent, wxEvent)
 
 const wxEventTable *wxEvtHandler::GetEventTable() const { return &wxEvtHandler::sm_eventTable; }
 
@@ -342,8 +344,11 @@ bool wxEvtHandler::ProcessEvent(wxEvent& event)
       return win->GetParent()->GetEventHandler()->ProcessEvent(event);
   }
 
-  // Last try - application object
-  if (wxTheApp && this != wxTheApp && wxTheApp->ProcessEvent(event))
+  // Last try - application object.
+  // Special case: don't pass wxEVT_IDLE to wxApp, since it'll always swallow it.
+  // wxEVT_IDLE is sent explicitly to wxApp so it will be processed appropriately
+  // via SearchEventTable.
+  if (wxTheApp && this != wxTheApp && (event.GetEventType() != wxEVT_IDLE) && wxTheApp->ProcessEvent(event))
     return TRUE;
   else
     return FALSE;