X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0757d27c1ef472cda74b1a35fd19938e5936e965..d1427b705318677afe28b1291867f6930c8823a7:/src/common/event.cpp diff --git a/src/common/event.cpp b/src/common/event.cpp index d3cb798bdf..09a8f871d0 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -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;