#include "wx/unix/private/epolldispatcher.h"
#include "wx/private/selectdispatcher.h"
-#define TRACE_EVENTS _T("events")
+#define TRACE_EVENTS wxT("events")
// ===========================================================================
// wxEventLoop::PipeIOHandler implementation
wxConsoleEventLoop::~wxConsoleEventLoop()
{
- delete m_wakeupPipe;
+ if ( m_wakeupPipe )
+ {
+ if ( m_dispatcher )
+ {
+ m_dispatcher->UnregisterFD(m_wakeupPipe->GetReadFd());
+ }
+
+ delete m_wakeupPipe;
+ }
}
//-----------------------------------------------------------------------------
bool wxConsoleEventLoop::Dispatch()
{
- DispatchTimeout(wxFDIODispatcher::TIMEOUT_INFINITE);
+ DispatchTimeout(static_cast<unsigned long>(
+ wxFDIODispatcher::TIMEOUT_INFINITE));
return true;
}