]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/timerimpl.cpp
fix warnings about hiding virtual wxGraphicsContext::DrawText() overloads by using...
[wxWidgets.git] / src / common / timerimpl.cpp
index d952af816f79d9d2d44e46745f4cacc33b7bc140..c2ac8e8712865e56c09eaf220652e61f02642c85 100644 (file)
@@ -29,6 +29,7 @@
 
 #include "wx/private/timer.h"
 #include "wx/utils.h"               // for wxNewId()
+#include "wx/thread.h"
 
 wxTimerImpl::wxTimerImpl(wxTimer *timer)
 {
@@ -47,9 +48,8 @@ void wxTimerImpl::SetOwner(wxEvtHandler *owner, int timerid)
 
 void wxTimerImpl::SendEvent()
 {
-    wxTimerEvent event(m_idTimer, m_milli);
-    event.SetEventObject(m_owner);
-    (void)m_owner->ProcessEvent(event);
+    wxTimerEvent event(*m_timer);
+    (void)m_owner->SafelyProcessEvent(event);
 }
 
 bool wxTimerImpl::Start(int milliseconds, bool oneShot)