X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/71e9885be0a84f3c544b992aeb3a842f821035b5..3b28ca6503fcd460d7de157ecf8b485590252156:/src/osx/core/evtloop_cf.cpp diff --git a/src/osx/core/evtloop_cf.cpp b/src/osx/core/evtloop_cf.cpp index 704a833413..ef70c2368e 100644 --- a/src/osx/core/evtloop_cf.cpp +++ b/src/osx/core/evtloop_cf.cpp @@ -5,6 +5,7 @@ // Created: 2009-10-18 // RCS-ID: $Id$ // Copyright: (c) 2009 Vadim Zeitlin +// (c) 2013 Rob Bresalier // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -42,23 +43,28 @@ #include "wx/nonownedwnd.h" #endif +#include + // ============================================================================ // wxCFEventLoopSource and wxCFEventLoop implementation // ============================================================================ #if wxUSE_EVENTLOOP_SOURCE -void wxCFEventLoopSource::SetFileDescriptor(CFFileDescriptorRef cffd) +void wxCFEventLoopSource::InitSourceSocket(CFSocketRef cfSocket) { - wxASSERT_MSG( !m_cffd, "shouldn't be called more than once" ); + wxASSERT_MSG( !m_cfSocket, "shouldn't be called more than once" ); - m_cffd = cffd; + m_cfSocket = cfSocket; } wxCFEventLoopSource::~wxCFEventLoopSource() { - if ( m_cffd ) - CFRelease(m_cffd); + if ( m_cfSocket ) + { + CFSocketInvalidate(m_cfSocket); + CFRelease(m_cfSocket); + } } #endif // wxUSE_EVENTLOOP_SOURCE